Skip to content

Commit 79c28eb

Browse files
committed
Fix dependency conflicts: numpy<2 override, onnxruntime cuDNN 9
- Exclude numpy and onnxruntime from CosyVoice requirements.txt - Pin numpy<2 (onnxruntime compiled against NumPy 1.x ABI) - Use onnxruntime-gpu>=1.19 (cuDNN 9 compatible, base image has cuDNN 9) - Remove redundant numpy from API dependencies line
1 parent e8deaa5 commit 79c28eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docker/gpu/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ RUN pip install --no-cache-dir transformers==4.51.3
2525
# using the system setuptools which still has pkg_resources
2626
RUN pip install --no-cache-dir "setuptools<71" wheel cython "numpy<2" && \
2727
cd cosyvoice_repo && \
28-
grep -iv "torch\|torchaudio\|tensorrt\|deepspeed\|transformers\|openai-whisper" requirements.txt > requirements_filtered.txt && \
28+
grep -iv "torch\|torchaudio\|tensorrt\|deepspeed\|transformers\|openai-whisper\|onnxruntime\|numpy" requirements.txt > requirements_filtered.txt && \
2929
pip install --no-cache-dir -r requirements_filtered.txt && \
3030
pip install --no-cache-dir --no-build-isolation openai-whisper==20231117 && \
31-
pip install --no-cache-dir modelscope onnxruntime-gpu huggingface_hub && \
31+
pip install --no-cache-dir modelscope "onnxruntime-gpu>=1.19" huggingface_hub && \
3232
pip install --no-cache-dir --force-reinstall torchvision --index-url https://download.pytorch.org/whl/cu128
3333

34-
# Install API dependencies
35-
RUN pip install --no-cache-dir fastapi uvicorn[standard] python-multipart numpy soundfile
34+
# Install API dependencies (numpy already pinned <2 above, don't override)
35+
RUN pip install --no-cache-dir fastapi uvicorn[standard] python-multipart soundfile
3636

3737
# Copy API code
3838
COPY api/ ./api/

0 commit comments

Comments
 (0)