Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /workspace | |
| # Install system packages | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # β Create writable directories for Chainlit | |
| RUN mkdir -p /workspace/.files /workspace/.chainlit && chmod -R 777 /workspace | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| # Copy app code | |
| COPY . . | |
| # β Set environment variables to writable paths | |
| ENV CHAINLIT_PROJECT_ROOT=/workspace | |
| ENV CHAINLIT_STORAGE_DIR=/workspace/.chainlit | |
| # β Default CMD to run Chainlit app | |
| CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"] | |