Download mathly2/Dockerfile from wzender/mathly: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/spaces/wzender/mathly/resolve/main/mathly2/Dockerfile
- Command line
-
hf download hf://spaces/wzender/mathly/mathly2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/wzender/mathly/resolve/main/mathly2/Dockerfile
600 Bytes
| # syntax=docker/dockerfile:1 | |
| # Build from the repository root: docker build -f mathly2/Dockerfile -t mathly2 . | |
| # CPU image; runs on Hugging Face Spaces (Docker SDK), Render, Fly, or any VM. | |
| FROM python:3.11-slim | |
| # Spaces runs the container as uid 1000 | |
| RUN useradd -m -u 1000 user | |
| ENV HOME=/home/user PYTHONUNBUFFERED=1 | |
| WORKDIR /home/user/app | |
| COPY mathly2/requirements.txt mathly2/requirements.txt | |
| RUN pip install --no-cache-dir -r mathly2/requirements.txt | |
| USER user | |
| COPY --chown=user mathly2 ./mathly2 | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn mathly2.main:app --host 0.0.0.0 --port ${PORT:-7860}"] | |