Download Dockerfile from rairo/Tese-api: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/rairo/Tese-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rairo/Tese-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rairo/Tese-api/resolve/main/Dockerfile
736 Bytes
| FROM python:3.10-slim | |
| # 1) Install system deps (Graphviz provides `dot`) | |
| USER root | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| graphviz \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2) Create non-root user | |
| RUN useradd -m -u 1000 user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # 3) Copy only requirements first for better caching | |
| COPY requirements.txt $HOME/app/requirements.txt | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # 4) Copy the rest of the app | |
| COPY . $HOME/app | |
| # 5) Fix ownership (no 777 needed) | |
| RUN chown -R user:user $HOME/app | |
| USER user | |
| # Optional: sanity check during build (remove later if you want) | |
| # RUN which dot && dot -V | |
| CMD ["python", "main.py"] |