Skip to content

Conversation

@DrewThomasson
Copy link

@DrewThomasson DrewThomasson commented Apr 2, 2025

You can now easily make the Dockerfile build for different Torch GPU versions

Examples ->

Default:

docker build -t diffrhythm-image .    # This will build with the defaults found in docker/requirements.txt

Specifying a GPU build option:

docker build --build-arg TORCH_VERSION=cuda11 -t diffrhythm-image .

TORCH_VERSION Options = cuda12, cuda128, cuda11, rocm, xpu, cpu

@DrewThomasson
Copy link
Author

👍 ?

@DrewThomasson
Copy link
Author

The requirements.txt in the docker was kind of broken

So I removed it and also moved the Dockerfile and docker-compose to the main repo dir

which is where they are suppose to be

@DrewThomasson
Copy link
Author

I added the app.py

but im getting


/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:118: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
  warnings.warn(
Current working directory: /app
cpu
Using device: cpu
Loading base model (95s) and components...
./g2p/sources/g2p_chinese_model/poly_bert_model.onnx
Traceback (most recent call last):
  File "/app/gradio/app.py", line 54, in <module>
    cfm, tokenizer, muq, vae = prepare_model(max_frames=max_frames_short, device=device)
  File "/app/infer/infer_utils.py", line 107, in prepare_model
    tokenizer = CNENTokenizer()
  File "/app/infer/infer_utils.py", line 232, in __init__
    from g2p.g2p_generation import chn_eng_g2p
  File "/app/g2p/g2p_generation.py", line 10, in <module>
    from g2p.utils.g2p import phonemizer_g2p
  File "/app/g2p/utils/g2p.py", line 17, in <module>
    phonemizer_zh = EspeakBackend(
  File "/usr/local/lib/python3.10/site-packages/phonemizer/backend/espeak/espeak.py", line 45, in __init__
    super().__init__(
  File "/usr/local/lib/python3.10/site-packages/phonemizer/backend/espeak/base.py", line 39, in __init__
    super().__init__(
  File "/usr/local/lib/python3.10/site-packages/phonemizer/backend/base.py", line 77, in __init__
    raise RuntimeError(  # pragma: nocover
RuntimeError: espeak not installed on your system

@DrewThomasson
Copy link
Author

DrewThomasson commented Apr 3, 2025

It appears more work may be needed to get the app.py to work or something.
I'll have to fix this later,

But the torch additions to the dockerfile for the requirements.xt should work

I'll get back to this when I find free time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant