Spaces:
Sleeping
Sleeping
Download Dockerfile from mjpsm/activity-progression-api: direct link, hf CLI and curl.
- Browser
- Download file 861 Bytes
-
https://huggingface.co/spaces/mjpsm/activity-progression-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mjpsm/activity-progression-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mjpsm/activity-progression-api/resolve/main/Dockerfile
861 Bytes
| # syntax=docker/dockerfile:1 | |
| FROM python:3.11-slim-bookworm | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| HF_HOME=/home/user/.cache/huggingface | |
| # Spaces run the container as uid 1000; give it a writable home for the | |
| # model cache. | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && useradd -m -u 1000 user | |
| WORKDIR /app | |
| # llama-cpp-python comes from the project's prebuilt CPU wheel index, so | |
| # nothing is compiled here (no llama.cpp checkout, no llama-server). | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir \ | |
| --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \ | |
| --only-binary llama-cpp-python \ | |
| -r requirements.txt | |
| COPY app ./app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |