Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +24 -0
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Install Python dependencies
|
| 6 |
+
COPY requirements.txt .
|
| 7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
+
|
| 9 |
+
# Pre-download AnimeGANv2 models
|
| 10 |
+
RUN python -c "from huggingface_hub import hf_hub_download; \
|
| 11 |
+
hf_hub_download(repo_id='vumichien/AnimeGANv2_Hayao', filename='AnimeGANv2_Hayao.onnx', local_dir='models', local_dir_use_symlinks=False); \
|
| 12 |
+
hf_hub_download(repo_id='vumichien/AnimeGANv2_Shinkai', filename='AnimeGANv2_Shinkai.onnx', local_dir='models', local_dir_use_symlinks=False)" \
|
| 13 |
+
&& rm -rf /root/.cache/huggingface/hub
|
| 14 |
+
|
| 15 |
+
# Copy application code
|
| 16 |
+
COPY app.py .
|
| 17 |
+
COPY static/ static/
|
| 18 |
+
|
| 19 |
+
# Expose port
|
| 20 |
+
ENV PORT=7860
|
| 21 |
+
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
# Start
|
| 24 |
+
CMD ["python", "app.py"]
|