Download Dockerfile from Cnass/4kanime: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/spaces/Cnass/4kanime/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Cnass/4kanime/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Cnass/4kanime/resolve/main/Dockerfile
653 Bytes
| FROM python:3.12-slim | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends ffmpeg ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /home/user/app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| ENV MODEL_DIR=/opt/models | |
| COPY app/models.py /tmp/models.py | |
| RUN python /tmp/models.py && chmod -R a+r /opt/models | |
| COPY --chown=user app ./app | |
| COPY --chown=user static ./static | |
| USER user | |
| ENV PYTHONUNBUFFERED=1 OV_CACHE_DIR=/tmp/ov_cache | |
| WORKDIR /home/user/app/app | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "75"] | |