Ask Your Question
0

How can I do do cuda calculations with PyTorch and anaconda on the graphics workstations in the lab?

asked 2020-10-20 11:05:16 +0100

uhl@in.tum.de gravatar image
client services

I want to do some Cuda Calculations in the RBG Graphics Workstations.

I need Anaconda and PyTorch for that.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-10-20 11:40:07 +0100

uhl@in.tum.de gravatar image
client services

updated 2022-01-20 11:54:39 +0100

Connection

  1. Connect to lxhalle: ssh [RGB / LDAP / in.tum.de username]@lxhalle.in.tum.de

  2. From lxhalle connect to a running graphics workstations: ssh [RGB / LDAP / in.tum.de username]@at-x-y-z.stud.rbg.tum.de

Development setup

Install Anaconda

Find the latest version of Anaconda for Linux x8664 (should be something like: Anaconda-...-Linux-x8664.sh) from the Anaconda Distribution Page (https://repo.anaconda.com/archive/) and copy the script name. On the remote workstation download the bash script to the /tmp folder

cd /tmp 
curl -O https://repo.anaconda.com/archive/Anaconda3-<2020.07>-Linux-x86_64.sh

Verify integrity of the installer:

md5sum Anaconda3-2020.07-Linux-x86_64.sh

Run the installer script:

bash Anaconda3-2020.07-Linux-x86_64.sh

Activate installation:

source ~/.bashrc

Test installation:

conda list

Create conda environment

conda create --name myenv python=3.6

Activate conda environment

conda activate myenv

Install pytorch and necessary cuda dependencies:

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

Verify

Start python interpreter:

python

Verify PyTorch installation:

from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)

Verify, that GPU driver and CUDA are available to PyTorch:

import torch
torch.cuda.is_available()
torch.cuda.get_device_name(0)

General

Check GPU utilization on workstation:

nvidia-smi

Questions

For more information write to rbg@in.tum.de

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-10-20 11:05:16 +0100

Seen: 48 times

Last updated: Jan 20 '22