Download Dockerfile from ADXabhi/cap: direct link, hf CLI and curl.
- Browser
- Download file 692 Bytes
-
https://huggingface.co/spaces/ADXabhi/cap/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ADXabhi/cap/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ADXabhi/cap/resolve/main/Dockerfile
692 Bytes
| # Use Python 3.9 Slim | |
| FROM python:3.9-slim | |
| # Install FFmpeg, libass, and FONTS | |
| RUN apt-get update && \ | |
| apt-get install -y ffmpeg libass-dev wget \ | |
| fonts-liberation fonts-dejavu fonts-freefont-ttf fontconfig && \ | |
| fc-cache -f -v && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Setup User | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy all python files | |
| COPY --chown=user app.py . | |
| COPY --chown=user ass_generator.py . | |
| COPY --chown=user styles.py . | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |