Installation#
PtyRAD package is available on both PyPI and conda-forge, while the source codes are hosted on GitHub with additional demo params files and demo scripts.
Platform and hardware compatibility#
PtyRAD uses PyTorch as the computation backend, which supports a wide range of machines as shown below.
Assuming you have created and activated a fresh Python environment for PtyRAD, click on the corresponding to jump to your options:
Installation options#
Windows and Linux system with a CUDA-supported GPU (NVidia)
pip install ptyrad
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118 --force-reinstall
Specify CUDA version
PyTorch ships with the specified CUDA runtime (the /cu118 in the url) so please make sure your machine has a compatible GPU driver. Run nvidia-smi in your terminal to see the maximum supported CUDA runtime version. You can modify the url if your machine supports newer CUDA runtime.
conda install ptyrad pytorch-gpu -c conda-forge
Specify CUDA version
Although pytorch-gpu -c conda-forge should automatically detect a compatible CUDA runtime version for your machine, if you want explicit control of the CUDA runtime version via conda, you should do:
conda install ptyrad pytorch pytorch-cuda=11.8 -c nvidia -c pytorch -c conda-forge
The pytorch-cuda=11.8 specifies the CUDA runtime version and you can modify the pytorch-cuda=X.Y if your machine supports newer CUDA runtime. Run nvidia-smi in your terminal to see the maximum supported CUDA runtime version.
However, note that PyTorch’s official Anaconda channel (-c pytorch) is deprecated since PyTorch 2.6 according to the PyTorch team announcement, so the maximum version of PyTorch you can get will be 2.5.1 via this command. You have to use -c conda-forge to get newer PyTorch if you still want to use conda.
Linux with an ROCm-supported GPU (AMD)
Important
PtyRAD is explictly tested on Windows and Linux with NVidia GPUs and macOS with an Apple Silicon GPU. If you’re using AMD GPUs on Linux, some functionality may not work as expected. Please report your issues here.
pip install ptyrad
pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6.3 --force-reinstall
Specify ROCm version
PyTorch ships with the specified ROCm runtime (the /rocm6.3 in the url) so please make sure your machine has a compatible GPU driver. Run amd-smi in your terminal to see the maximum supported ROCm runtime version. You can modify the url if your machine supports newer ROCm runtime.
conda-forge/pytorch team is still working on making compatible PyTorch build with ROCm (AMD) GPUs. It may or may not happen, please use pip for now, or follow progress here.
Windows / Linux without a GPU
pip install ptyrad
conda install ptyrad -c conda-forge
MacOS with or without Apple Silicon GPU
pip install ptyrad
macOS with Apple Silicon GPU
PyTorch’s macOS pip wheels contain the MPS support by default, but it will only be used if supported Apple Silicon hardware is detected.
conda install ptyrad -c conda-forge
macOS with Apple Silicon GPU
conda-forge/pytorch provides a universal macOS build with MPS support included, but it will only be used if supported Apple Silicon hardware is detected.