user206667
user206667

Reputation: 1

nvidia GPU available only for python2.7

enter image description here

nvidia gpu is not available for python3.6, it's only available for python2.7 version. I'm working on ubuntu, cuda 10.1, and all drivers working properly. I also tried by creating new python environment but still gpu is available for python, not python3. what should i do to use the gpu for runing python3 script?

please note that, tensorflow-gpu, torch is already installed and they work on python2, the only problem is that python3 doesn't use the gpu, including jupyter notebook(uses python3). i use ssh to connect to the server, nvidia docker is already installed.

Upvotes: 0

Views: 332

Answers (1)

user206667
user206667

Reputation: 1

I was able to solve the issue by using the nvidia docker images

  1. Look for your docker image:
$ docker images
  1. Run the docker image with specified IMAGE ID:
$ docker run --rm -it --runtime=nvidia --net=host -v /<local dir>/:/<destination dir> <IMAGE ID>

$ docker run --rm -it --runtime=nvidia --net=host -v /my_sever_dir/:/notebook 8d78dd1e1q
  1. To access the jupyter notebook, copy the token and paste it on the browser(in the below example, provide your correct ip address and token. The port:8888 could be different if its already taken, for instance try:8889):
http://YOUR_IP:8888/?token=YOUR_TOKEN_FROM_STEP_2_ABOVE

Upvotes: 0

Related Questions