Download Dockerfile from Iodevsho/live-view: direct link, hf CLI and curl.
- Browser
- Download file 739 Bytes
-
https://huggingface.co/spaces/Iodevsho/live-view/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Iodevsho/live-view/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Iodevsho/live-view/resolve/main/Dockerfile
739 Bytes
| # Use a slim Python image and install ffmpeg via apt | |
| FROM python:3.11-slim | |
| # keep Python output unbuffered | |
| ENV PYTHONUNBUFFERED=1 | |
| # install ffmpeg and clean up apt cache to keep image small | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends ffmpeg curl && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # create app user for non-root runtime | |
| RUN useradd --create-home --shell /bin/bash appuser | |
| WORKDIR /app | |
| # copy dependency file and install Python deps | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # copy application code | |
| COPY . /app | |
| # expose default uvicorn port | |
| EXPOSE 7860 | |
| # run uvicorn; use a single worker (tune for your 2 vCPU instance) | |
| CMD ["python", "main.py"] | |