-
Version avec Python 3.10 et CUDA 11.7
#!/bin/bash # Charger les modules pour CernVM-FS module load StdEnv/2023 module load scipy-stack/2024a module load nvhpc/23.9 module load python/3.10 # Créer un projet avec un environnement virtuel mkdir -p projet_avec_cuda cd projet_avec_cuda virtualenv -p /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.10.13/bin/python venv source venv/bin/activate # Installer la dernière version de PyTorch 1.\* avec les dépendances qui fonctionnent avec CUDA 11.7 pip3 install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html # Tester la détection du GPU par PyTorch python <<HEREDOC import torch print(torch.cuda.is_available()) # devrait afficher True print(torch.cuda.device_count()) # devrait afficher 8 HEREDOC
Edited by François Pelletier
Please register or sign in to comment