Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829FROM python:3.10-slim# Cài đặt đầy đủ thư viện hệ thống để tránh lỗi biên dịch (Exit code 1)RUN apt-get update && apt-get install -y \ffmpeg git cmake build-essential \libasound2-dev libsndfile1-dev \&& rm -rf /var/lib/apt/lists/*WORKDIR /app# Tải mã nguồnRUN git clone https://github.com/fishaudio/fish-speech.git .# Cài đặt PyTorch bản nhẹ (CPU)RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu# Cài đặt Fish Speech và sửa lỗi phụ thuộcRUN pip install --no-cache-dir -e .RUN pip install --no-cache-dir gradio open-webui# Cấu hình cổng Hugging FaceENV GRADIO_SERVER_NAME="0.0.0.0"ENV GRADIO_SERVER_PORT=7860# Mở cổng API nội bộEXPOSE 7860# Chạy cả API Server và WebUICMD python -m tools.api_server --device cpu --port 7861 & python -m tools.webui --device cpu12345678910111213141516171819202122232425262728293031FROM python:3.10-slim# Cài đặt các thư viện hệ thống cần thiết (Bổ sung portaudio để fix pyaudio nếu cần)RUN apt-get update && apt-get install -y \ffmpeg git cmake build-essential \portaudio19-dev libasound2-dev libsndfile1-dev \&& rm -rf /var/lib/apt/lists/*WORKDIR /app# Tải mã nguồnRUN git clone --depth 1 https://github.com/fishaudio/fish-speech.git .# Cài đặt PyTorch CPURUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu# Cài đặt các gói phụ thuộc, bỏ qua PyAudio nếu nó gây lỗi build# Lệnh này sẽ cài các thư viện cần thiết trướcRUN pip install --no-cache-dir setuptools wheelRUN pip install --no-cache-dir -e . || (sed -i '/pyaudio/d' requirements.txt && pip install --no-cache-dir -e .)# Thiết lập cổng cho Hugging FaceENV GRADIO_SERVER_NAME="0.0.0.0"ENV GRADIO_SERVER_PORT=7860ENV PYTHONUNBUFFERED=1# Mở cổng giao diệnEXPOSE 7860# Chạy WebUI và APICMD python -m tools.api_server --device cpu --port 7861 & python -m tools.webui --device cpu
Dockerfile+12-10