vipsphi commited on
Commit
0538d11
·
verified ·
1 Parent(s): 6ac7a9f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -1,4 +1,5 @@
1
- FROM python:3.10-slim
 
2
 
3
  # 1. Cài đặt thư viện hệ thống
4
  RUN apt-get update && apt-get install -y \
@@ -7,23 +8,21 @@ RUN apt-get update && apt-get install -y \
7
 
8
  WORKDIR /app
9
 
10
- # 2. Tải code từ GitHub
11
  RUN git clone https://github.com/pnnbao97/VieNeu-TTS.git .
12
 
13
- # 3. SỬA LỖI VERSION: Hạ cấp networkx xuống 3.2.1 để chạy được trên Python 3.10
14
- RUN sed -i 's/networkx==3.5/networkx==3.2.1/g' requirements.txt
15
-
16
- # 4. Cài đặt các thư viện Python
17
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
18
  RUN pip install --no-cache-dir -r requirements.txt
19
  RUN pip install --no-cache-dir neucodec>=0.0.4 phonemizer>=3.3.0
20
 
21
- # 5. Cấu hình Gradio
22
  ENV GRADIO_SERVER_NAME="0.0.0.0"
23
  ENV GRADIO_SERVER_PORT=7860
24
  ENV PYTHONUNBUFFERED=1
25
 
26
  EXPOSE 7860
27
 
28
- # 6. Chạy giao diện
29
  CMD ["python", "gradio_app.py"]
 
1
+ # Đổi từ python 3.10 sang 3.11 để tương thích hoàn toàn với numpy 2.3.4 và networkx 3.5
2
+ FROM python:3.11-slim
3
 
4
  # 1. Cài đặt thư viện hệ thống
5
  RUN apt-get update && apt-get install -y \
 
8
 
9
  WORKDIR /app
10
 
11
+ # 2. Tự động lấy code từ GitHub
12
  RUN git clone https://github.com/pnnbao97/VieNeu-TTS.git .
13
 
14
+ # 3. Cài đặt các thư viện Python (Sẽ trơn tru đã dùng Python 3.11)
15
+ RUN pip install --no-cache-dir --upgrade pip
 
 
16
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
17
  RUN pip install --no-cache-dir -r requirements.txt
18
  RUN pip install --no-cache-dir neucodec>=0.0.4 phonemizer>=3.3.0
19
 
20
+ # 4. Cấu hình Gradio cho Hugging Face
21
  ENV GRADIO_SERVER_NAME="0.0.0.0"
22
  ENV GRADIO_SERVER_PORT=7860
23
  ENV PYTHONUNBUFFERED=1
24
 
25
  EXPOSE 7860
26
 
27
+ # 5. Chạy giao diện chính
28
  CMD ["python", "gradio_app.py"]