Spaces:
Sleeping
Sleeping
Download Dockerfile from Swizzyy/Dockerhost: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/spaces/Swizzyy/Dockerhost/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Swizzyy/Dockerhost/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Swizzyy/Dockerhost/resolve/main/Dockerfile
421 Bytes
| # Use a lightweight Python image | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy server code | |
| COPY server.py . | |
| # Set Environment defaults | |
| ENV PORT=7860 | |
| ENV API_KEY="replace_in_huggingface_settings" | |
| # Run as non-root user for security | |
| RUN useradd -m myuser | |
| USER myuser | |
| # Start FastAPI with Uvicorn | |
| CMD ["python", "server.py"] |