FROM python:3.10-slim RUN apt-get update && apt-get install -y \ ffmpeg \ libsm6 \ libxext6 \ git \ wget \ supervisor \ && rm -rf /var/lib/apt/lists/* # Pre-cache model RUN mkdir -p /root/.cache/torch/hub/checkpoints/ RUN wget -q https://github.com/bryandlee/animegan2-pytorch/raw/main/weights/face_paint_512_v2.pt \ -O /root/.cache/torch/hub/checkpoints/face_paint_512_v2.pt RUN git clone https://github.com/bryandlee/animegan2-pytorch.git /root/.cache/torch/hub/bryandlee_animegan2-pytorch_main WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf EXPOSE 7860 EXPOSE 5000 CMD ["/usr/bin/supervisord"]