Spaces:
Runtime error
Runtime error
Download Dockerfile from pnstack/template-python: direct link, hf CLI and curl.
- Browser
- Download file 630 Bytes
-
https://huggingface.co/spaces/pnstack/template-python/resolve/f7b07449ca83f0a002364185aeffb0e7e5e016a5/Dockerfile
- Command line
-
hf download hf://spaces/pnstack/template-python@f7b07449ca83f0a002364185aeffb0e7e5e016a5/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/pnstack/template-python/resolve/f7b07449ca83f0a002364185aeffb0e7e5e016a5/Dockerfile
630 Bytes
| FROM python:3.11-slim AS base | |
| ENV LANG=C.UTF-8 \ | |
| LC_ALL=C.UTF-8 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONFAULTHANDLER=1 | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends gcc && \ | |
| apt-get install -y ffmpeg libsm6 libxext6 && \ | |
| apt-get install -y zbar-tools && \ | |
| apt-get install -y libzbar-dev | |
| RUN pip install --upgrade pip | |
| FROM base AS builder | |
| RUN python -m venv /.venv | |
| ENV PATH="/.venv/bin:$PATH" | |
| COPY requirements.txt . | |
| RUN pip install -r requirements.txt | |
| FROM base as runtime | |
| WORKDIR /app | |
| COPY --from=builder /.venv /.venv | |
| ENV PATH="/.venv/bin:$PATH" | |
| COPY . /app | |
| EXPOSE 8000 | |
| CMD ["python", "main.py"] |