-
Notifications
You must be signed in to change notification settings - Fork 28
Install
Sam Reeve edited this page Oct 19, 2021
·
14 revisions
Simple dependency installation instructions in the README
For installing a specific PyTorch version on a machine that has only CPU:
pip3 install torch==1.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip3 install torch-scatter==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip3 install torch-sparse==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip3 install torch-cluster==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip3 install torch-spline-conv==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip3 install torch-geometric
For installing on a machine that has GPUs and PyTorch already installed:
pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --no-index torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --no-index torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install --no-index torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-geometric
where ${CUDA} and ${TORCH} should be replaced by your specific CUDA version (cpu, cu92, cu101, cu102, cu110) and PyTorch version (1.4.0, 1.5.0, 1.6.0, 1.7.0)
- Get an interactive job from a queue with GPUs, e.g.,
gpu_p100
salloc -A ccsd -p gpu_p100 -N 1 -n1 -c1 -G1 --mem=0G -t 01:00:00 /bin/bash
- Set up a python virtual environment called
name-env
and save it in directorysubdir/
python3 -m venv subdir/name-env
- Activate the environment
name-env
source subdir/name-env/bin/activate
2.1 load PE-gnu
for MPI
module load PE-gnu/3.0
- Install
torch
packages with CUDA support (you can customize your own versions)
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://pytorch-geometric.com/whl/torch-1.9.0+cu102.html
Installation done! Next, time to run the code.
Installation has been done already (non-trivial for IBM/NVIDIA machine) - skip to run instructions.