Spaces:
Running
Running
Download Dockerfile from mjpsm/project-creation-api-v2: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/spaces/mjpsm/project-creation-api-v2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mjpsm/project-creation-api-v2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mjpsm/project-creation-api-v2/resolve/main/Dockerfile
474 Bytes
| FROM python:3.11-slim | |
| ENV PYTHONUNBUFFERED=1 HF_HOME=/tmp/huggingface TORCH_NUM_THREADS=2 | |
| WORKDIR /app | |
| RUN pip install --no-cache-dir torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| RUN useradd -m -u 1000 user && mkdir -p /tmp/huggingface && chown -R user:user /app /tmp/huggingface | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |