churnsight-ai / Dockerfile
Hasitha16's picture
Update Dockerfile
e83f844 verified
raw
history blame
860 Bytes
FROM python:3.10-slim
WORKDIR /code
# System dependencies
RUN apt-get update && apt-get install -y \
libsndfile1 ffmpeg git \
&& rm -rf /var/lib/apt/lists/*
# Copy project files
COPY . /code
# Set safe cache + config + data paths
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV HF_HOME=/tmp/hf-home
ENV TRANSFORMERS_CACHE=/tmp/hf-cache
ENV NLTK_DATA=/tmp/nltk_data
ENV HOME=/tmp # πŸ‘ˆ fixes default fallback for Streamlit
ENV XDG_CONFIG_HOME=/tmp # πŸ‘ˆ fixes config path
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Create writable .streamlit config folder
RUN mkdir -p /tmp/.streamlit
# Expose ports
EXPOSE 7860
EXPOSE 8000
# Final launch command
CMD ["bash", "-c", "streamlit run frontend.py --server.port 7860 & uvicorn main:app --host 0.0.0.0 --port 8000"]