Spaces:
Running
Running
Download Dockerfile from lukehola/opa-traint: direct link, hf CLI and curl.
- Browser
- Download file 698 Bytes
-
https://huggingface.co/spaces/lukehola/opa-traint/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/lukehola/opa-traint/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/lukehola/opa-traint/resolve/main/Dockerfile
698 Bytes
| # Opa Traint — public Space image. Contains zero personal data. | |
| FROM python:3.11-slim | |
| # HF Spaces run as a non-root user with UID 1000. | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user . . | |
| # WORKDIR created /home/user/app as root; hand it to the app user so it can | |
| # create its local data cache at runtime. | |
| RUN mkdir -p /home/user/app/data && chown -R user:user /home/user/app | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PORT=7860 \ | |
| DATA_DIR=/home/user/app/data | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |