Download Dockerfile from Kompres/Web: direct link, hf CLI and curl.
- Browser
- Download file 922 Bytes
-
https://huggingface.co/spaces/Kompres/Web/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Kompres/Web/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Kompres/Web/resolve/main/Dockerfile
922 Bytes
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 appuser | |
| USER appuser | |
| ENV HOME=/home/appuser \ | |
| PATH=/home/appuser/.local/bin:$PATH \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR $HOME/app | |
| COPY --chown=appuser ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=appuser . . | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/_stcore/health')" || exit 1 | |
| CMD ["streamlit", "run", "app.py", \ | |
| "--server.port=7860", \ | |
| "--server.address=0.0.0.0", \ | |
| "--server.headless=true", \ | |
| "--browser.gatherUsageStats=false"] | |