| FROM python:3.10-slim |
|
|
| RUN apt-get update && apt-get install -y \ |
| ffmpeg \ |
| libsm6 \ |
| libxext6 \ |
| git \ |
| wget \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| 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 . |
|
|
| EXPOSE 7860 |
| CMD ["python", "app.py"] |