Download Dockerfile from xplorers/MIS_API: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/spaces/xplorers/MIS_API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/xplorers/MIS_API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/xplorers/MIS_API/resolve/main/Dockerfile
825 Bytes
| FROM python:3.13-slim | |
| # install system requirements for OpenCV to work | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 && rm -rf /var/lib/apt/lists/* | |
| # setup non-root user that HF spaces require | |
| RUN useradd -m -u 1000 appuser | |
| USER appuser | |
| ENV HOME=/home/appuser \ | |
| PATH=/home/appuser/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # copy requirements and assign ownership | |
| COPY --chown=appuser requirements.txt . | |
| # install dependency | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN pip install --no-cache-dir fastapi uvicorn python-multipart | |
| # copy application code | |
| COPY --chown=appuser . $HOME/app | |
| # port 7860 to the outside HF Hub bridge | |
| EXPOSE 7860 | |
| # Launch uvicorn on all internal adaptors (0.0.0.0) so HF can connect! | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |