File size: 710 Bytes
c7d4ed3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.11-slim

WORKDIR /app

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Pre-download AnimeGANv2 models
RUN python -c "from huggingface_hub import hf_hub_download; \
    hf_hub_download(repo_id='vumichien/AnimeGANv2_Hayao', filename='AnimeGANv2_Hayao.onnx', local_dir='models', local_dir_use_symlinks=False); \
    hf_hub_download(repo_id='vumichien/AnimeGANv2_Shinkai', filename='AnimeGANv2_Shinkai.onnx', local_dir='models', local_dir_use_symlinks=False)" \
    && rm -rf /root/.cache/huggingface/hub

# Copy application code
COPY app.py .
COPY static/ static/

# Expose port
ENV PORT=7860
EXPOSE 7860

# Start
CMD ["python", "app.py"]