Update Dockerfile
Browse files- Dockerfile +12 -11
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# Sử dụng Python 3.11 để tương thích tốt nhất
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# 1. Cài đặt thư viện hệ thống
|
|
@@ -8,21 +7,23 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# 2.
|
| 12 |
RUN git clone https://github.com/pnnbao97/VieNeu-TTS.git .
|
| 13 |
|
| 14 |
-
# 3. DỌN DẸP requirements.txt
|
| 15 |
-
#
|
| 16 |
-
RUN sed -i '/
|
| 17 |
-
sed -i '/
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
# 4. CÀI ĐẶT
|
| 20 |
RUN pip install --no-cache-dir --upgrade pip
|
| 21 |
-
# Cài
|
| 22 |
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
| 23 |
-
# Cài
|
| 24 |
-
RUN pip install --no-cache-dir "numpy<2.1.0"
|
| 25 |
-
# Cài
|
| 26 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 27 |
RUN pip install --no-cache-dir neucodec>=0.0.4 phonemizer>=3.3.0
|
| 28 |
|
|
|
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
# 1. Cài đặt thư viện hệ thống
|
|
|
|
| 7 |
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
+
# 2. TẢI MÃ NGUỒN LÊN TRƯỚC (Clone từ GitHub)
|
| 11 |
RUN git clone https://github.com/pnnbao97/VieNeu-TTS.git .
|
| 12 |
|
| 13 |
+
# 3. DỌN DẸP TRIỆT ĐỂ requirements.txt
|
| 14 |
+
# Xóa triton-windows (vì đây là Linux), xóa torch/numpy để cài bản riêng
|
| 15 |
+
RUN sed -i '/triton-windows/d' requirements.txt && \
|
| 16 |
+
sed -i '/torch/d' requirements.txt && \
|
| 17 |
+
sed -i '/numpy/d' requirements.txt && \
|
| 18 |
+
sed -i '/networkx/d' requirements.txt
|
| 19 |
|
| 20 |
+
# 4. CÀI ĐẶT TỪNG BƯỚC AN TOÀN
|
| 21 |
RUN pip install --no-cache-dir --upgrade pip
|
| 22 |
+
# Cài Torch CPU
|
| 23 |
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
| 24 |
+
# Cài các bản thư viện tương thích Python 3.11
|
| 25 |
+
RUN pip install --no-cache-dir "numpy<2.1.0" "networkx<3.3"
|
| 26 |
+
# Cài các gói còn lại trong requirements.txt (sau khi đã dọn dẹp lỗi)
|
| 27 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
RUN pip install --no-cache-dir neucodec>=0.0.4 phonemizer>=3.3.0
|
| 29 |
|