Skip to content

Commit

Permalink
Merge pull request #8129 from leofang/core_doc
Browse files Browse the repository at this point in the history
Update conda installation guide
  • Loading branch information
kmaehashi committed Jan 24, 2024
2 parents 9c01872 + 184e0d8 commit 4c5bbf3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Binary packages are also available for Linux and Windows on [Conda-Forge](https:
| --------------------- | --------------------------- | ------------------------------------------------------------- |
| CUDA | x86_64 / aarch64 / ppc64le | `conda install -c conda-forge cupy` |

If you need to use a particular CUDA version (say 11.8), you can do `conda install -c conda-forge cupy cuda-version=11.8`.
If you need a slim installation (without also getting CUDA dependencies installed), you can do `conda install -c conda-forge cupy-core`.

If you need to use a particular CUDA version (say 12.0), you can use the `cuda-version` metapackage to select the version, e.g. `conda install -c conda-forge cupy cuda-version=12.0`.

> [!NOTE]\
> If you encounter any problem with CuPy installed from `conda-forge`, please feel free to report to [cupy-feedstock](https://github.com/conda-forge/cupy-feedstock/issues), and we will help investigate if it is just a packaging issue in `conda-forge`'s recipe or a real issue in CuPy.
Expand Down
19 changes: 14 additions & 5 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,24 @@ Please make sure that only one CuPy package (``cupy`` or ``cupy-cudaXX`` where X
Installing CuPy from Conda-Forge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Conda/Anaconda is a cross-platform package management solution widely used in scientific computing and other fields.
Conda is a cross-language, cross-platform package management solution widely used in scientific computing and other fields.
The above ``pip install`` instruction is compatible with ``conda`` environments. Alternatively, for both Linux (x86_64,
ppc64le, aarch64-sbsa) and
Windows once the CUDA driver is correctly set up, you can also install CuPy from the ``conda-forge`` channel::

$ conda install -c conda-forge cupy

and ``conda`` will install a pre-built CuPy binary package for you, along with the CUDA runtime libraries
(``cudatoolkit``). It is not necessary to install CUDA Toolkit in advance.
(``cudatoolkit`` for CUDA 11 and below, or ``cuda-XXXXX`` for CUDA 12 and above). It is not necessary to install CUDA Toolkit in advance.

Conda has a built-in mechanism to determine and install the latest version of ``cudatoolkit`` supported by your driver.
If you aim at minimizing the installation footprint, you can install the ``cupy-core`` package::

$ conda install -c conda-forge cupy-core

which only depends on ``numpy``. None of the CUDA libraries will be installed this way, and it is your responsibility to install the needed
dependencies youself, either from conda-forge or elsewhere. This is equivalent of the ``cupy-cudaXX`` wheel installation.

Conda has a built-in mechanism to determine and install the latest version of ``cudatoolkit`` or any other CUDA components supported by your driver.
However, if for any reason you need to force-install a particular CUDA version (say 11.8), you can do::

$ conda install -c conda-forge cupy cuda-version=11.8
Expand All @@ -141,10 +148,12 @@ However, if for any reason you need to force-install a particular CUDA version (

.. note::

If you did not install CUDA Toolkit by yourself, the ``nvcc`` compiler might not be available, as
If you did not install CUDA Toolkit by yourself, for CUDA 11 and below the ``nvcc`` compiler might not be available, as
the ``cudatoolkit`` package from ``conda-forge`` does not include the ``nvcc`` compiler toolchain. If you would like to use
it from a local CUDA installation, you need to make sure the version of CUDA Toolkit matches that of ``cudatoolkit`` to
avoid surprises.
avoid surprises. For CUDA 12 and above, ``nvcc`` can be installed on a per-``conda`` environment basis via

$ conda install -c conda-forge cuda-nvcc


.. _install_cupy_from_source:
Expand Down

0 comments on commit 4c5bbf3

Please sign in to comment.