Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gnina installation on WSL hosted Ubuntu 22.04 #247

Open
demos57 opened this issue Mar 14, 2024 · 3 comments
Open

Gnina installation on WSL hosted Ubuntu 22.04 #247

demos57 opened this issue Mar 14, 2024 · 3 comments

Comments

@demos57
Copy link

demos57 commented Mar 14, 2024

Issue summary

Installation of gnina on WSL2 Ubuntu-22.04
The Ubuntu repositories omit the installation of the Nvidia graphics driver when installing the nvidia-cuda-toolkit in WSL, as it is controlled by the W11 graphics driver. However, a "glitch" arises: the CUDA versions can be tied to older versions of the graphics driver. Therefore, to ensure compatibility, it's necessary, after you update the W11 graphics driver, to uninstall the Ubuntu repository installation of the toolkit first, and then install the appropriate toolkit from the Nvidia developer's site.

Steps to reproduce

$ sudo apt-get remove nvidia-cuda-toolkit
$ wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
$ chmod 700 cuda_12.4.0_550.54.14_linux.run
$ sudo sh cuda_12.4.0_550.54.14_linux.run

At this point it is recommended that you install the CUDNN library:
$ wget https://developer.download.nvidia.com/compute/cudnn/9.0.0/local_installers/cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
$ sudo dpkg -i cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
$ sudo cp /var/cudnn-local-repo-ubuntu2204-9.0.0/cudnn-*-keyring.gpg /usr/share/keyrings/
$ sudo apt-get update
$ sudo apt-get -y install cudnn-cuda-12

Then proceed with the following steps:
Install prerequisites:
$ apt-get install build-essential git cmake wget libboost-all-dev libeigen3-dev libgoogle-glog-dev libprotobuf-dev protobuf-compiler libhdf5-dev libatlas-base-dev python3-dev librdkit-dev python3-numpy python3-pip python3-pytest

Install OpenBabel3.
$ git clone https://github.com/openbabel/openbabel.git
$ cd openbabel
$ mkdir build
$ cd build
$ cmake -DWITH_MAEPARSER=OFF -DWITH_COORDGEN=OFF -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON ..
$ make -j8
$ sudo make install

Install gnina
$ git clone https://github.com/gnina/gnina.git
$ cd gnina
$ mkdir build
cd build
$ cmake ..
$ make -j8
$ sudo make install

Your system configuration

Operating sysstem: WSL Ubuntu 22.04
Compiler: GNU 11.5
CUDA version (if applicable): 12.4
CUDNN version (if applicable): 9
Python version: 311

@dkoes
Copy link
Contributor

dkoes commented Mar 16, 2024

This is less an issue than a recipe for installation on WSL that can be added to the readme, right?

@demos57
Copy link
Author

demos57 commented Mar 17, 2024

Of course, I put it as an issue because I couldn't pull a request for the README.

@mainguyenanhvu
Copy link

Hi @demos57, I am trying to install in WSL2. Have you finished it? Please help me to solve #255

Thank you very much.

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

No branches or pull requests

3 participants