Spaces:
Running
Running
Download Dockerfile from Che237/cyberforge: direct link, hf CLI and curl.
- Browser
- Download file 845 Bytes
-
https://huggingface.co/spaces/Che237/cyberforge/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Che237/cyberforge/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Che237/cyberforge/resolve/main/Dockerfile
845 Bytes
| # Python 3.11: the version this image has been built and run with | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| git-lfs \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && git lfs install | |
| # Create user for HF Spaces | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy requirements and install dependencies | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY --chown=user . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run the API via uvicorn (FastAPI only, no web interface) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |