Diese Topic beschreibt wie man die CUDA library samples und PyTorch auf cuda01 - cuda06 benutzen kann.

ALERT! Bitte Applikationen mit großer Datenmenge nicht im Home-Verzeichnis speichern, sondern auf /srv/public oder alternativen wie bezeichnet in ServicesFile - Danke!

CUDA Samples:

# REMINDER: do not do this in your home directory - thanks!
test -d /srv/public/$USER || mkdir /srv/public/$USER
cd /srv/public/$USER
git clone https://github.com/NVIDIA/cuda-samples.git
cd cuda-samples/Samples/1_Utilities/deviceQuery
make clean
make deviceQuery
./deviceQuery 

PyTorch:

# REMINDER: do not do this in your home directory - thanks!
test -d /srv/public/$USER || mkdir /srv/public/$USER
cd /srv/public/$USER
# create python3 virtual environment
python3 -m venv test-env
# enter it
source test-env/bin/activate
# now install pytorch
pip3 install torch
# latest and preview: https://pytorch.org/get-started/locally/
# previous: https://pytorch.org/get-started/previous-versions/
python3
import torch
# check if NVIDIA driver and GPU are supported 
torch.cuda.is_available()     # should return True
torch.zeros(1).cuda()          # should return tensor([0.], device='cuda:0')
Topic revision: r1 - 08 Jan 2025, Ak4640fuUserTopic - This page was cached on 01 May 2025 - 15:43.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback