main
sh 15 lines 716 Bytes
Raw
1 #!/bin/bash
2
3 python_executable=python$1
4 pytorch_version=$2
5 cuda_version=$3
6
7 # Install torch
8 $python_executable -m pip install numpy pyyaml scipy ipython mkl mkl-include ninja cython typing pandas typing-extensions dataclasses setuptools && conda clean -ya
9 $python_executable -m pip install torch=="${pytorch_version}+cu${cuda_version//./}" --extra-index-url "https://download.pytorch.org/whl/cu${cuda_version//./}"
10
11 # Print version information
12 $python_executable --version
13 $python_executable -c "import torch; print('PyTorch:', torch.__version__)"
14 $python_executable -c "import torch; print('CUDA:', torch.version.cuda)"
15 $python_executable -c "from torch.utils import cpp_extension; print (cpp_extension.CUDA_HOME)"