Download Dockerfile from SLM-Archive/hyperdex-trainer: direct link, hf CLI and curl.
- Browser
- Download file 765 Bytes
-
https://huggingface.co/SLM-Archive/hyperdex-trainer/resolve/main/Dockerfile
- Command line
-
hf download hf://SLM-Archive/hyperdex-trainer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/SLM-Archive/hyperdex-trainer/resolve/main/Dockerfile
765 Bytes
| FROM python:3.12-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| HF_HUB_ENABLE_HF_TRANSFER=0 \ | |
| PORT=7860 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential git curl && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| COPY --chown=user . . | |
| RUN mkdir -p /home/user/app/runtime /home/user/.cache/huggingface && \ | |
| chown -R user:user /home/user | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", \ | |
| "--workers", "1", "--timeout-keep-alive", "75"] | |