Spaces:
Sleeping
Sleeping
Download api/Dockerfile from msdkhairi/math2latex: direct link, hf CLI and curl.
- Browser
- Download file 697 Bytes
-
https://huggingface.co/spaces/msdkhairi/math2latex/resolve/main/api/Dockerfile
- Command line
-
hf download hf://spaces/msdkhairi/math2latex/api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/msdkhairi/math2latex/resolve/main/api/Dockerfile
697 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 CUDA_VISIBLE_DEVICES="" \ | |
| MATH2LATEX_THREADS=2 MATH2LATEX_MODEL_DIR=/app/artifacts/formulanet | |
| RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt pyproject.toml setup.py ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY scripts ./scripts | |
| RUN pip install --no-cache-dir --no-deps . && python -m image_to_latex.artifacts | |
| COPY api ./api | |
| RUN useradd --create-home --uid 1000 appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |