cosrigel commited on
Commit
03bdc04
·
verified ·
1 Parent(s): 34df39d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile (CPU)
2
+ FROM python:3.10-slim-bookworm
3
+
4
+ ENV PIP_NO_CACHE_DIR=1 \
5
+ HF_HOME=/root/.cache/huggingface \
6
+ PYTHONUNBUFFERED=1 \
7
+ TMP_DIR=/data/tmp \
8
+ HF_WEIGHTS_DIR=/data/dia_ckpt
9
+
10
+ # Cài system packages cần cho audio & build
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 libsndfile1 \
13
+ && rm -rf /var/lib/apt/lists/* \
14
+ && git lfs install
15
+
16
+ WORKDIR /app
17
+
18
+ # Cài Python deps trước (tận dụng cache)
19
+ COPY requirements.txt /app/requirements.txt
20
+ RUN python -m pip install --upgrade pip && pip install -r /app/requirements.txt
21
+
22
+ # Copy toàn bộ app
23
+ COPY . /app
24
+
25
+ # Chạy Gradio app; trong code bạn đã tự queue() nếu có SPACE_ID
26
+ ENV SPACE_ID=docker
27
+ CMD ["python", "app_local.py"]