Spaces:
Runtime error
Runtime error
Download Dockerfile from PhaelSide/cnesst-chatbot: direct link, hf CLI and curl.
- Browser
- Download file 735 Bytes
-
https://huggingface.co/spaces/PhaelSide/cnesst-chatbot/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/PhaelSide/cnesst-chatbot/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/PhaelSide/cnesst-chatbot/resolve/main/Dockerfile
735 Bytes
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for layer caching | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY app.py . | |
| COPY static/ static/ | |
| COPY chroma_db/ chroma_db/ | |
| # Set environment variables | |
| ENV PORT=7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV TOKENIZERS_PARALLELISM=false | |
| # HuggingFace Spaces runs as non-root user (uid 1000) | |
| RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app | |
| USER 1000 | |
| # Expose port | |
| EXPOSE 7860 | |
| # Start the application | |
| CMD ["python", "app.py"] | |