GPU/CUDA support for toolshed deep learning plugin
Hello, I am a student from Professor Jing He's lab at Old Dominion University. I am trying to enable GPU acceleration for our deep learning plugin, DeepSSETracer. The problem I am running into is that python in the chimerax environment cannot see cuda. Varying cuda versions seems to rule out including cuda as a dependency. Additionally, we would like to avoid custom cuda installations via the chimerax terminal, as it would greatly complicate installation for the users of our plugin. Is there a way to support cuda or GPU acceleration in another way (that ideally does not require user interaction with the chimerax terminal)? Or, could you point me towards tools that have managed to do this? I found this library, ONNX Runtime and wonder if it may be useful: https://onnxruntime.ai/docs/get-started/with-python.html#install-onnx-runtim... Best regards, Bryan Hawickhorst Old Dominion University
Hi Bryan, Are you using the machine learning toolkit PyTorch? To use CUDA with PyTorch you can simply list PyTorch as a dependency in your ChimeraX plugin pyproject.toml (new format) file or bundle_info.xml file (old format). That works on Linux because the Linux PyTorch includes CUDA support by default. On Windows with Nvidia graphics the standard PyTorch from the PyPi repository does not include CUDA support so you have to install a special version. I do this with the ChimeraX Boltz structure prediction tool. When you first use it it installs PyTorch and Boltz in a somewhat fancy way making a Python virtual environment and using a subprocess to install cuda enabled torch pip install torch --index-url https://download.pytorch.org/whl/cu126 That is probably too complex for your needs. I see online that pyproject.toml can specify specific dependencies using a URL so possibly something like the following would work on windows [project] name = "my-project" version = "0.1.0" dependencies = [ "torch @ https://download.pytorch.org/whl/cu130/torch-2.9.1%2Bcu130-cp311-cp311-win_a...; python_version == "3.10"; sys_platform == "win32", "..." ] Tom
On Dec 1, 2025, at 10:47 AM, HAWICKHORST, BRYAN via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello,
I am a student from Professor Jing He's lab at Old Dominion University. I am trying to enable GPU acceleration for our deep learning plugin, DeepSSETracer.
The problem I am running into is that python in the chimerax environment cannot see cuda.
Varying cuda versions seems to rule out including cuda as a dependency. Additionally, we would like to avoid custom cuda installations via the chimerax terminal, as it would greatly complicate installation for the users of our plugin.
Is there a way to support cuda or GPU acceleration in another way (that ideally does not require user interaction with the chimerax terminal)? Or, could you point me towards tools that have managed to do this?
I found this library, ONNX Runtime and wonder if it may be useful: https://onnxruntime.ai/docs/get-started/with-python.html#install-onnx-runtim...
Best regards, Bryan Hawickhorst Old Dominion University _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (2)
-
HAWICKHORST, BRYAN -
Tom Goddard