cap / Dockerfile
ADXabhi's picture
Upload 7 files
e902a4a verified
raw
history blame contribute delete
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"]