Spaces:
Sleeping
Sleeping
Download Dockerfile from PixCell-SS/PixCell-Backend: direct link, hf CLI and curl.
- Browser
- Download file 628 Bytes
-
https://huggingface.co/spaces/PixCell-SS/PixCell-Backend/resolve/refs%2Fpr%2F1/Dockerfile
- Command line
-
hf download hf://spaces/PixCell-SS/PixCell-Backend@refs/pr/1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/PixCell-SS/PixCell-Backend/resolve/refs%2Fpr%2F1/Dockerfile
628 Bytes
| FROM python:3.10-slim | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install PyTorch first from official index (fast & reliable CPU wheels) | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir \ | |
| torch==2.4.1 torchvision==0.19.1 \ | |
| --index-url https://download.pytorch.org/whl/cpu | |
| # Install everything else | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your code | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |