Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| libmagic1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install requirements | |
| COPY requirements.txt ./ | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # Copy the project | |
| COPY . . | |
| # --- FIX START: Move these ABOVE the Entrypoint --- | |
| # Create the specific DB folder and give it full permissions | |
| RUN mkdir -p /tmp/chroma_db && chmod -R 777 /tmp/chroma_db | |
| # --- FIX END --- | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", \ | |
| "--server.port=8501", \ | |
| "--server.address=0.0.0.0", \ | |
| "--server.enableXsrfProtection=false", \ | |
| "--server.enableCORS=false", \ | |
| "--server.maxUploadSize=50"] |