Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
|
|
|
|
| 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.
|
| 11 |
RUN git clone https://github.com/pnnbao97/VieNeu-TTS.git .
|
| 12 |
|
| 13 |
-
# 3.
|
| 14 |
-
RUN
|
| 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 |
-
#
|
| 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 |
-
#
|
| 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 vì đã 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"]
|