[chimerax-users] Cupy dependency for ChimeraX bundle

Greg Couch gregc at cgl.ucsf.edu
Tue Jun 9 10:28:20 PDT 2020


FYI, the OpenMM package, that is distributed with ChimeraX, wants CUDA 
10.1.  So I'd recommend install Cupy-cuda101.  Keeping packages that use 
CUDA in-sync with each other will be a problem.

To use pip from within ChimeraX, you could import pip and call 
pip.main(), but the recommended way to run it in a subprocess and 
subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 
'Cupy-cuda101']).

     -- Greg

On 6/9/2020 9:54 AM, Tom Goddard wrote:
> Hi Arthur,
>
>    The Cupy PyPi package has a source version and separate precompiled binary versions for CUDA versions 80,90,91,100,101,102.  If you use the source distribution the user's computer has to have compilers installed (most users won't have this on Windows), and it will likely fail if CUDA is not installed.  If you use a binary version you would need to know what CUDA version the user's computer has.  On top of this the CUDA binary Cupy packages are quite large 300 Mbytes, so you may not want to have a user download that unless they can really use it (ie have the right CUDA installed).  This use of CUDA is a bit of software compatibility nightmare.
>
>    You could have your running ChimeraX tool pip install cupy if the user requests by choosing  menu item say.  Your tool could look for their installed CUDA version and then pip install the correct cupy precompiled binary.  The ChimeraX toolshed does these pip installs so there is probably a ChimeraX API you could call to do it -- Conrad Huang or Greg Couch would have to advise where to find that.  Cupy would be installed under the user's home directory, not with the original ChimeraX install since we assume the original ChimeraX install is not writable and all Toolshed bundles go under the user's home directory.
>
> 	Tom
>
>
>    
>
>> On Jun 9, 2020, at 6:17 AM, Arthur Ecoffet <arthurecoffet at gmail.com> wrote:
>>
>> Hi,
>>
>> I am currently trying to develop a bundle for ChimeraX and the methods implemented can both run on GPU (using Cupy with a Cuda dependency) or on CPU.
>>
>> I am wondering how to deal with this "pseudo-dependency" with cupy, since it is not necessary to run the code but it is more computationally efficient.
>> If a Cupy dependency is written in the "bundle_info.xml" file, will it create errors for computers without Nvidia Cuda installed ?
>>
>> Is there any way for users to install supplemental package by hand directly in chimeraX python as it was possible with Chimera ? Or is the only solution to add by hand a dependency line in the xml file ?
>>
>> Thanks,
>> Arthur
>> _______________________________________________
>> ChimeraX-users mailing list
>> ChimeraX-users at cgl.ucsf.edu
>> Manage subscription:
>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users


More information about the ChimeraX-users mailing list