Spaces:
Runtime error
Runtime error
Download Dockerfile from danielostrow/c2sentinel: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/spaces/danielostrow/c2sentinel/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/danielostrow/c2sentinel/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/danielostrow/c2sentinel/resolve/main/Dockerfile
745 Bytes
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app | |
| COPY app.py . | |
| # Create a non-root user with proper home directory | |
| RUN useradd -m -u 1000 user | |
| ENV HOME=/home/user | |
| ENV HF_HOME=/home/user/.cache/huggingface | |
| ENV GRADIO_SERVER_NAME=0.0.0.0 | |
| ENV GRADIO_SERVER_PORT=7860 | |
| # Create cache directories and set permissions | |
| RUN mkdir -p /home/user/.cache/huggingface && \ | |
| chown -R user:user /home/user && \ | |
| chown -R user:user /app | |
| USER user | |
| WORKDIR /app | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run the app | |
| CMD ["python", "app.py"] | |