Skip to content

Docker with 5090 not working (AttributeError: module 'torch.nn' has no attribute 'Module') #114

@tudorms

Description

@tudorms

Hi,

I tried both the default and the -cu128 docker compose variants on Docker Desktop (Windows 11 WSL2) and neither appears to work. These are the logs for the default docker compose:

2026-02-05 22:11:11.924 | 
2026-02-05 22:11:11.924 | ==========
2026-02-05 22:11:11.924 | == CUDA ==
2026-02-05 22:11:11.924 | ==========
2026-02-05 22:11:11.925 | 
2026-02-05 22:11:11.925 | CUDA Version 12.8.1
2026-02-05 22:11:11.926 | 
2026-02-05 22:11:11.926 | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2026-02-05 22:11:11.926 | 
2026-02-05 22:11:11.926 | This container image and its contents are governed by the NVIDIA Deep Learning Container License.
2026-02-05 22:11:11.926 | By pulling and using the container, you accept the terms and conditions of this license:
2026-02-05 22:11:11.926 | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
2026-02-05 22:11:11.926 | 
2026-02-05 22:11:11.926 | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
2026-02-05 22:11:11.930 | 
2026-02-05 22:11:15.337 | 2026-02-06 06:11:15 [INFO] __main__: Starting TTS Server directly on http://0.0.0.0:8004
2026-02-05 22:11:15.338 | 2026-02-06 06:11:15 [INFO] __main__: API documentation will be available at http://0.0.0.0:8004/docs
2026-02-05 22:11:15.338 | 2026-02-06 06:11:15 [INFO] __main__: Web UI will be available at http://0.0.0.0:8004/
2026-02-05 22:11:15.371 | INFO:     Started server process [1]
2026-02-05 22:11:15.371 | INFO:     Waiting for application startup.
2026-02-05 22:11:15.373 | 2026-02-06 06:11:15 [INFO] server: TTS Server: Initializing application...
2026-02-05 22:11:15.374 | 2026-02-06 06:11:15 [INFO] server: Configuration loaded. Log file at: /app/logs/tts_server.log
2026-02-05 22:11:15.560 | /usr/local/lib/python3.10/dist-packages/torch/cuda/__init__.py:235: UserWarning: 
2026-02-05 22:11:15.560 | NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
2026-02-05 22:11:15.560 | The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_70 sm_75 sm_80 sm_86 sm_90.
2026-02-05 22:11:15.560 | If you want to use the NVIDIA GeForce RTX 5090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
2026-02-05 22:11:15.560 | 
2026-02-05 22:11:15.560 |   warnings.warn(
2026-02-05 22:11:15.769 | 2026-02-06 06:11:15 [INFO] engine: CUDA requested and functional. Using CUDA.
2026-02-05 22:11:15.770 | 2026-02-06 06:11:15 [INFO] engine: Final device selection: cuda
2026-02-05 22:11:15.770 | 2026-02-06 06:11:15 [INFO] engine: Model selector from config: 'chatterbox-turbo'
2026-02-05 22:11:15.771 | 2026-02-06 06:11:15 [INFO] engine: Model selector 'chatterbox-turbo' resolved to Turbo model (ChatterboxTurboTTS)
2026-02-05 22:11:15.771 | 2026-02-06 06:11:15 [INFO] engine: Initializing ChatterboxTurboTTS on device 'cuda'...
2026-02-05 22:11:15.772 | 2026-02-06 06:11:15 [INFO] engine: Model type: turbo
2026-02-05 22:11:15.772 | 2026-02-06 06:11:15 [INFO] engine: Turbo model supports paralinguistic tags: ['laugh', 'chuckle', 'sigh', 'gasp', 'cough', 'clear throat', 'sniff', 'groan', 'shush']
2026-02-05 22:12:02.496 | 2026-02-06 06:12:02 [ERROR] engine: Failed to load model using from_pretrained: CUDA error: no kernel image is available for execution on the device
2026-02-05 22:12:02.496 | CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
2026-02-05 22:12:02.496 | For debugging consider passing CUDA_LAUNCH_BLOCKING=1
2026-02-05 22:12:02.496 | Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
2026-02-05 22:12:02.496 | Traceback (most recent call last):
2026-02-05 22:12:02.496 |   File "/app/engine.py", line 292, in load_model
2026-02-05 22:12:02.496 |     chatterbox_model = model_class.from_pretrained(device=model_device)
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/chatterbox/tts_turbo.py", line 202, in from_pretrained
2026-02-05 22:12:02.496 |     return cls.from_local(local_path, device)
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/chatterbox/tts_turbo.py", line 146, in from_local
2026-02-05 22:12:02.496 |     ve.to(device).eval()
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1340, in to
2026-02-05 22:12:02.496 |     return self._apply(convert)
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 900, in _apply
2026-02-05 22:12:02.496 |     module._apply(fn)
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/rnn.py", line 288, in _apply
2026-02-05 22:12:02.496 |     self._init_flat_weights()
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/rnn.py", line 215, in _init_flat_weights
2026-02-05 22:12:02.496 |     self.flatten_parameters()
2026-02-05 22:12:02.496 |   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/rnn.py", line 269, in flatten_parameters
2026-02-05 22:12:02.496 |     torch._cudnn_rnn_flatten_weight(
2026-02-05 22:12:02.496 | RuntimeError: CUDA error: no kernel image is available for execution on the device
2026-02-05 22:12:02.496 | CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
2026-02-05 22:12:02.496 | For debugging consider passing CUDA_LAUNCH_BLOCKING=1
2026-02-05 22:12:02.496 | Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
2026-02-05 22:12:02.496 | 
2026-02-05 22:12:02.496 | 2026-02-06 06:12:02 [CRITICAL] server: CRITICAL: TTS Model failed to load on startup. Server might not function correctly.
2026-02-05 22:12:02.497 | 2026-02-06 06:12:02 [INFO] server: Application startup sequence complete.
2026-02-05 22:12:02.497 | INFO:     Application startup complete.
2026-02-05 22:12:02.499 | INFO:     Uvicorn running on http://0.0.0.0:8004 (Press CTRL+C to quit)

And these are the logs for the -cu128 docker compose (which keeps restarting in a loop):

2026-02-05 22:18:48.805 | 
2026-02-05 22:18:48.805 | ==========
2026-02-05 22:18:48.805 | == CUDA ==
2026-02-05 22:18:48.805 | ==========
2026-02-05 22:18:48.806 | 
2026-02-05 22:18:48.806 | CUDA Version 12.8.1
2026-02-05 22:18:48.807 | 
2026-02-05 22:18:48.807 | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2026-02-05 22:18:48.807 | 
2026-02-05 22:18:48.807 | This container image and its contents are governed by the NVIDIA Deep Learning Container License.
2026-02-05 22:18:48.807 | By pulling and using the container, you accept the terms and conditions of this license:
2026-02-05 22:18:48.807 | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
2026-02-05 22:18:48.807 | 
2026-02-05 22:18:48.807 | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
2026-02-05 22:18:48.811 | 
2026-02-05 22:18:51.704 | Traceback (most recent call last):
2026-02-05 22:18:51.704 |   File "/app/server.py", line 62, in <module>
2026-02-05 22:18:51.704 |     import engine  # TTS Engine interface
2026-02-05 22:18:51.704 |   File "/app/engine.py", line 12, in <module>
2026-02-05 22:18:51.704 |     from chatterbox.tts import ChatterboxTTS  # Main TTS engine class
2026-02-05 22:18:51.704 |   File "/usr/local/lib/python3.10/dist-packages/chatterbox/__init__.py", line 9, in <module>
2026-02-05 22:18:51.704 |     from .tts import ChatterboxTTS
2026-02-05 22:18:51.704 |   File "/usr/local/lib/python3.10/dist-packages/chatterbox/tts.py", line 6, in <module>
2026-02-05 22:18:51.704 |     import perth
2026-02-05 22:18:51.704 |   File "/usr/local/lib/python3.10/dist-packages/perth/__init__.py", line 13, in <module>
2026-02-05 22:18:51.704 |     from .perth_net.perth_net_implicit.perth_watermarker import PerthImplicitWatermarker
2026-02-05 22:18:51.704 |   File "/usr/local/lib/python3.10/dist-packages/perth/perth_net/__init__.py", line 4, in <module>
2026-02-05 22:18:51.704 |     from .perth_net_implicit.perth_watermarker import PerthImplicitWatermarker
2026-02-05 22:18:51.704 |   File "/usr/local/lib/python3.10/dist-packages/perth/perth_net/perth_net_implicit/perth_watermarker.py", line 5, in <module>
2026-02-05 22:18:51.704 |     from .model.perth_net import PerthNet
2026-02-05 22:18:51.704 |   File "/usr/local/lib/python3.10/dist-packages/perth/perth_net/perth_net_implicit/model/__init__.py", line 5, in <module>
2026-02-05 22:18:51.704 |     class Conv(nn.Module):
2026-02-05 22:18:51.704 | AttributeError: module 'torch.nn' has no attribute 'Module'
2026-02-05 22:18:52.926 | 
2026-02-05 22:18:52.926 | ==========
2026-02-05 22:18:52.926 | == CUDA ==
2026-02-05 22:18:52.926 | ==========
2026-02-05 22:18:52.927 | 
2026-02-05 22:18:52.927 | CUDA Version 12.8.1
2026-02-05 22:18:52.927 | 
2026-02-05 22:18:52.927 | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2026-02-05 22:18:52.928 | 
2026-02-05 22:18:52.928 | This container image and its contents are governed by the NVIDIA Deep Learning Container License.
2026-02-05 22:18:52.928 | By pulling and using the container, you accept the terms and conditions of this license:
2026-02-05 22:18:52.928 | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
2026-02-05 22:18:52.928 | 
2026-02-05 22:18:52.928 | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
2026-02-05 22:18:52.932 | 
2026-02-05 22:18:53.785 | Traceback (most recent call last):
2026-02-05 22:18:53.785 |   File "/app/server.py", line 62, in <module>
2026-02-05 22:18:53.785 |     import engine  # TTS Engine interface
2026-02-05 22:18:53.785 |   File "/app/engine.py", line 12, in <module>
2026-02-05 22:18:53.785 |     from chatterbox.tts import ChatterboxTTS  # Main TTS engine class
2026-02-05 22:18:53.785 |   File "/usr/local/lib/python3.10/dist-packages/chatterbox/__init__.py", line 9, in <module>
2026-02-05 22:18:53.785 |     from .tts import ChatterboxTTS
2026-02-05 22:18:53.785 |   File "/usr/local/lib/python3.10/dist-packages/chatterbox/tts.py", line 6, in <module>
2026-02-05 22:18:53.785 |     import perth
2026-02-05 22:18:53.785 |   File "/usr/local/lib/python3.10/dist-packages/perth/__init__.py", line 13, in <module>
2026-02-05 22:18:53.785 |     from .perth_net.perth_net_implicit.perth_watermarker import PerthImplicitWatermarker
2026-02-05 22:18:53.785 |   File "/usr/local/lib/python3.10/dist-packages/perth/perth_net/__init__.py", line 4, in <module>
2026-02-05 22:18:53.785 |     from .perth_net_implicit.perth_watermarker import PerthImplicitWatermarker
2026-02-05 22:18:53.785 |   File "/usr/local/lib/python3.10/dist-packages/perth/perth_net/perth_net_implicit/perth_watermarker.py", line 5, in <module>
2026-02-05 22:18:53.785 |     from .model.perth_net import PerthNet
2026-02-05 22:18:53.785 |   File "/usr/local/lib/python3.10/dist-packages/perth/perth_net/perth_net_implicit/model/__init__.py", line 5, in <module>
2026-02-05 22:18:53.785 |     class Conv(nn.Module):
2026-02-05 22:18:53.785 | AttributeError: module 'torch.nn' has no attribute 'Module'
2026-02-05 22:18:55.095 | 

Any recommendations?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions