Spaces:
Sleeping
Sleeping
Download Dockerfile from okd06/calority-model-api: direct link, hf CLI and curl.
- Browser
- Download file 610 Bytes
-
https://huggingface.co/spaces/okd06/calority-model-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/okd06/calority-model-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/okd06/calority-model-api/resolve/main/Dockerfile
610 Bytes
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| ENV MODEL_TASK=nutrition-regression | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| WORKDIR /home/user/app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT}"] | |