Spaces:
Sleeping
Sleeping
Download Dockerfile from suyash-77/Deepguard-api: direct link, hf CLI and curl.
- Browser
- Download file 661 Bytes
-
https://huggingface.co/spaces/suyash-77/Deepguard-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/suyash-77/Deepguard-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/suyash-77/Deepguard-api/resolve/main/Dockerfile
661 Bytes
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies required for OpenCV and ONNX | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all backend files into the container | |
| COPY . . | |
| # Download the ONNX model inside the cloud container | |
| RUN python download_model.py | |
| # Expose the port FastAPI runs on | |
| EXPOSE 7860 | |
| # Command to run the application (Hugging Face Spaces expects 0.0.0.0) | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |