diff --git a/README.md b/README.md index c6fc976..190b2b0 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ pip install torch --index-url https://download.pytorch.org/whl/cpu # unless you pip install skala ``` +Or using Conda (Mamba): + +```bash +mamba install -c conda-forge skala "pytorch=*=cpu*" +``` + Run an SCF calculation with Skala for a hydrogen molecule: ```python @@ -45,15 +51,17 @@ ks.kernel() ``` Go to [microsoft.github.io/skala](https://microsoft.github.io/skala) for a more detailed installation guide and further examples of how to use Skala functional with PySCF and ASE and in [Azure Foundry](https://ai.azure.com/catalog/models/Skala). -## Getting started (GPU support) +## Getting started (GPU support via Mamba, includes CUDA toolkit, Torch, CuPy) + +Supports CUDA version 11, 12 or 13. You can find the most recent CUDA version that is supported on your system using `nvidia-smi`. -Install using Pip: ```bash -cu_version=128 #or 126 or 130 depending on your CUDA version -pip install torch cupy --extra-index-url "https://download.pytorch.org/whl/cu${cu_version}" -pip install --no-deps "gpu4pyscf-cuda${cu_version:0:2}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version:0:2}x>=0.4,<1" -pip install skala +cu_version=12 #or 11 or 13 depending on your CUDA version +mamba env create -n skala -f environment-gpu.yml "cuda-version==${cu_version}.*" skala +mamba activate skala +pip install --no-deps "gpu4pyscf-cuda${cu_version}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version}x>=0.4,<1" ``` + Run an SCF calculation with Skala for a hydrogen molecule on GPU: ```python diff --git a/docs/installation.rst b/docs/installation.rst index 8c126f3..9b623b9 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -72,12 +72,19 @@ If you prefer to install Skala from the source code, you can clone the repositor mamba activate skala pip install -e . -where `environment-cpu.yml` can be replaced for `environment-gpu.yml` for gpu support (CUDA 12) with gpu4pyscf, in which case gpu4pyscf needs to be separately installed *after creating the environment* via +where `environment-cpu.yml` can be replaced with `environment-gpu.yml` for gpu support (specify CUDA version with `cuda_version=`) with gpu4pyscf, in which case gpu4pyscf needs to be separately installed *after creating the environment* via (for CUDA 12) .. code-block:: bash pip install --no-deps 'gpu4pyscf-cuda12x>=1.0,<2' 'gpu4pyscf-libxc-cuda12x>=0.4,<1' + +or (for CUDA 13) + +.. code-block:: bash + + pip install --no-deps 'gpu4pyscf-cuda13x>=1.0,<2' 'gpu4pyscf-libxc-cuda13x>=0.4,<1' + To install the development dependencies, you can run: .. code-block:: bash diff --git a/environment-gpu.yml b/environment-gpu.yml index 02b3d52..3d7e43a 100644 --- a/environment-gpu.yml +++ b/environment-gpu.yml @@ -17,7 +17,7 @@ dependencies: - cuda-toolkit - cupy - cutensor - - cuda-version ==12.* + - cuda-version # Testing and development - pre-commit - pytest