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

How to enable gnina/gnina Docker container to use GPU? #213

Open
JonasLi-19 opened this issue Jul 23, 2023 · 5 comments
Open

How to enable gnina/gnina Docker container to use GPU? #213

JonasLi-19 opened this issue Jul 23, 2023 · 5 comments

Comments

@JonasLi-19
Copy link

Issue summary

I have already created and start a gnina container from gnina/gnina docker image, but I find I may need to do something (such as add CUDA?) to use GPU in my CentOS7 server.

WARNING: No GPU detected. CNN scoring will be slow.

Your system configuration

Host CentOS CUDA version: 11.8

@dkoes
Copy link
Contributor

dkoes commented Jul 24, 2023

I have updated the latest docker image so you might want to try again.

Docker uses the host nvidia drivers. For maximum compatibility you should build your own container using one of the provided Dockerfiles: https://github.com/gnina/gnina/blob/master/docker/ubuntu-22.04/Dockerfile

@SanFran-Me
Copy link

Dear developer, I am new to Docker, and I am a user in CentOS7 server without root permission.

I find your link of Dockerfiles is prepared for Ubuntu so I am wondering how to do some modifications to make it compatible with CentOS7? ( I am unable to use yum install so I am afraid I cannot use the Docker file even if it is modified...)

# Recommended build process

#get CUDA 
FROM nvidia/cuda:11.7.0-devel-ubuntu22.04

# get packages 
WORKDIR /root
RUN apt update ; apt upgrade -y ; apt-get -y 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 openbabel libopenbabel-dev python3-openbabel

ADD "https://github.com/gnina/gnina/commits?per_page=1" latest_commit

RUN git clone https://github.com/gnina/gnina.git; \
    cd gnina; mkdir build; cd build; \
    cmake -DCUDA_ARCH_NAME=All .. ;\
    make -j4 ; make install 

@dkoes
Copy link
Contributor

dkoes commented Jul 30, 2023

I think you are missing the point of docker, but if you want a recipe for building on centos see the compat dockerfile:
https://github.com/gnina/gnina/blob/master/docker/compat/Dockerfile

@dkoes
Copy link
Contributor

dkoes commented Aug 26, 2023

The Dockerfile shows you how to build the software on your own system without using docker.

@SanFran-Me
Copy link

In my opinion, the Dockerfile is to be used this way to build a compatible docker image:
docker build -t <your-image-name> .
And then you can run a new container with the newly generated docker image:
docker run -v /home/user/data:/data -it <your-image-name>

I am wondering why you give the Ubuntu/CentOS7 Dockerfile for the users? Is it not perfect to just use the docker pull gnina/gnina in Docker Hub?

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