Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
FROM nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
Expand Down Expand Up @@ -30,8 +30,17 @@ WORKDIR /app

# Copy requirements and install
COPY requirements.txt .
# Step 1: Install requirements (pins torch==2.7.0 from cu128 + other deps)
RUN pip install --no-cache-dir -r requirements.txt \
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
# Step 2: Install openai-whisper without deps (torch already installed above)
# setuptools<70 required: v70+ removed pkg_resources auto-injection in build_meta.run_setup()
RUN pip install --no-cache-dir "setuptools<70" \
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com \
&& pip install --no-cache-dir --no-build-isolation --no-deps openai-whisper==20231117 \
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com \
&& pip install --no-cache-dir numba tiktoken more-itertools \
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com

# Install additional dependencies
RUN pip install --no-cache-dir fastmcp funasr \
Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ async def ui():
if (selectedVoiceId) {
formData.append('voice', selectedVoiceId);
} else if (promptFile) {
formData.append('prompt_audio', promptFile);
formData.append('prompt_wav', promptFile);
formData.append('prompt_text', document.getElementById('prompt-text').value);
if (document.getElementById('save-voice').checked) formData.append('voice_name', document.getElementById('voice-name').value || '未命名');
} else { alert('请选择音色或上传参考音频'); btn.disabled = false; btnText.textContent = '🚀 生成语音'; return; }
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
FROM nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04

ARG VENV_NAME="cosyvoice"
ENV VENV=$VENV_NAME
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
--extra-index-url https://download.pytorch.org/whl/cu121
--extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ # https://github.com/microsoft/onnxruntime/issues/21684
--extra-index-url https://download.pytorch.org/whl/cu128
accelerate==0.34.2
bitsandbytes==0.45.0; sys_platform == 'linux'
conformer==0.3.2
Expand All @@ -13,6 +12,7 @@ grpcio==1.57.0
grpcio-tools==1.57.0
hydra-core==1.3.2
HyperPyYAML==1.2.2
ruamel.yaml==0.17.40
inflect==7.3.1
librosa==0.10.2
lightning==2.2.4
Expand All @@ -22,21 +22,21 @@ networkx==3.1
numpy==1.26.4
omegaconf==2.3.0
onnx==1.16.0
onnxruntime-gpu==1.18.0; sys_platform == 'linux'
onnxruntime-gpu==1.21.0; sys_platform == 'linux'
onnxruntime==1.18.0; sys_platform == 'darwin' or sys_platform == 'win32'
openai-whisper==20231117
# openai-whisper installed before this file in Dockerfile (needs setuptools<70 + --no-build-isolation)
protobuf==4.25
pyarrow==18.1.0
pydantic==2.7.0
pyworld==0.3.4
rich==13.7.1
soundfile==0.12.1
tensorboard==2.14.0
tensorrt-cu12==10.13.3.9; sys_platform == 'linux'
tensorrt-cu12-bindings==10.13.3.9; sys_platform == 'linux'
tensorrt-cu12-libs==10.13.3.9; sys_platform == 'linux'
torch==2.3.1
torchaudio==2.3.1
tensorrt-cu12>=10.8.0; sys_platform == 'linux'
tensorrt-cu12-bindings>=10.8.0; sys_platform == 'linux'
tensorrt-cu12-libs>=10.8.0; sys_platform == 'linux'
torch==2.7.0
torchaudio==2.7.0
transformers==4.51.3
x-transformers==2.11.24
uvicorn==0.30.0
Expand Down