Download Dockerfile from Fred808/Data2: direct link, hf CLI and curl.
- Browser
- Download file 701 Bytes
-
https://huggingface.co/spaces/Fred808/Data2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Fred808/Data2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Fred808/Data2/resolve/main/Dockerfile
701 Bytes
| FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Python + dependencies | |
| RUN apt-get update && apt-get install -y python3 python3-pip git && \ | |
| pip3 install --upgrade pip | |
| # Set working dir | |
| WORKDIR /app | |
| # Copy and install requirements | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app code | |
| COPY . . | |
| # Make the entire /app directory fully writeable for all users | |
| RUN chmod -R 777 /app | |
| # Ensure the app runs as the same user as the Space UI | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Launch FastAPI download server on container start | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |