Spaces:
Paused
Paused
Download Dockerfile from Chadbehaviour/sloptotal: direct link, hf CLI and curl.
- Browser
- Download file 811 Bytes
-
https://huggingface.co/spaces/Chadbehaviour/sloptotal/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Chadbehaviour/sloptotal/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Chadbehaviour/sloptotal/resolve/main/Dockerfile
811 Bytes
| FROM python:3.12-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Spaces draait als gebruiker 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| HF_HOME=/home/user/models \ | |
| PYTHONUNBUFFERED=1 \ | |
| SLOPTOTAL_FIRST_PARTY_ORIGINS="^.*$" | |
| WORKDIR /home/user/app | |
| # SlopTotal op een vaste, geteste versie | |
| RUN git clone https://github.com/pablocaeg/sloptotal.git . && \ | |
| git checkout 7552b062f84b4e638235a08c57eff6a7fef9144b | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # modellen vooraf binnenhalen (ongeveer 9 GB) | |
| COPY --chown=user prefetch.py . | |
| RUN python prefetch.py | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |