Spaces:
Sleeping
Sleeping
Download Dockerfile from arittrabag/zocket-backend: direct link, hf CLI and curl.
- Browser
- Download file 559 Bytes
-
https://huggingface.co/spaces/arittrabag/zocket-backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/arittrabag/zocket-backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/arittrabag/zocket-backend/resolve/main/Dockerfile
559 Bytes
| FROM python:3.10-slim | |
| # Install libGL for OpenCV | |
| RUN apt-get update && apt-get install -y libgl1 && rm -rf /var/lib/apt/lists/* | |
| # Create a non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Ensure pip install path is in PATH | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Set working directory | |
| WORKDIR /app | |
| # Install Python deps | |
| COPY --chown=user requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app code | |
| COPY --chown=user . /app | |
| # Start FastAPI using uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |