Spaces:
Build error
Build error
Download Dockerfile from XablauMoon/Recomend_AI: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/spaces/XablauMoon/Recomend_AI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/XablauMoon/Recomend_AI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/XablauMoon/Recomend_AI/resolve/main/Dockerfile
509 Bytes
| FROM python:3.9-slim | |
| # Segurança | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| # Copia arquivos de dependência | |
| COPY --chown=user requirements.txt constraints.txt ./ | |
| # Atualiza pip e instala SEM backtracking | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir \ | |
| -r requirements.txt \ | |
| -c constraints.txt | |
| # Copia o código | |
| COPY --chown=user . /app | |
| # FastAPI no padrão HF | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |