Spaces:
Runtime error
Runtime error
Download Dockerfile from XDR-SAM/source-cfv2: direct link, hf CLI and curl.
- Browser
- Download file 830 Bytes
-
https://huggingface.co/spaces/XDR-SAM/source-cfv2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/XDR-SAM/source-cfv2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/XDR-SAM/source-cfv2/resolve/main/Dockerfile
830 Bytes
| FROM python:3.10-slim | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PORT=7860 \ | |
| HOME=/home/user | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create a non-root user with UID 1000 | |
| RUN useradd -m -u 1000 user | |
| # Set up working directory inside home for proper permissions | |
| WORKDIR $HOME/app | |
| # Copy requirements first to leverage Docker cache | |
| COPY requirements.txt $HOME/app/ | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files (including main.py, saved_hybrid_model, deberta_model) | |
| COPY --chown=user:user . $HOME/app | |
| # Expose port 7860 (HuggingFace default) | |
| EXPOSE 7860 | |
| # Command to run uvicorn | |
| CMD ["python", "main.py"] | |