Skip to content

Commit cc92d5c

Browse files
authored
additional context on cuda version + formatting
1 parent 496785d commit cc92d5c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/user/tipsandtricks.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,18 @@ To verify that the correct platform is being used, run the following commands af
131131
python -c "import platform;print(platform.machine())" # Should print "x86_64"
132132
echo "CONDA_SUBDIR: $CONDA_SUBDIR" # Should print "CONDA_SUBDIR: osx-64"
133133
134+
135+
.. _installing_GPU_on_GPUs_and_CPUs:
136+
134137
Installing CUDA-enabled packages like TensorFlow and PyTorch
135138
============================================================
136139

137140
In conda-forge, some packages are available with GPU support. These packages not only take significantly longer to compile and build, but they also result in rather large binaries that users download. As an effort to maximize accessibility to users with lower connection and/or storage bandwidth, there is an ongoing effort to limit installing packages compiled for GPU use unnecessarily on CPU machines by default. This is accomplished by adding a run dependency, `__cuda`, that detects if the local machine has a GPU. However, this introduces challenges to people who may prefer to still download and use `-gpu` packages even on a non-GPU machine. For example, login nodes on HPCs often do not have GPUs and the compute counterparts with GPUs often do not have internet access. In this case, the user can still override the default settings via the environemnt variable `CONDA_CUDA_OVERRIDE`. At the time of writing (February 2022), our conclusion is this safe default behavior is best for most of conda-forge users, with an easy override option available. Please let us know if you have thoughts on this.
138141

139-
In order to override the default behavior, a user can set the environemnt variable `CONDA_CUDA_OVERRIDE` like below to install TensorFlow with GPU support even on a machine with CPU only.
142+
In order to override the default behavior, a user can set the environemnt variable `CONDA_CUDA_OVERRIDE` like below to install TensorFlow with GPU support even on a machine with CPU only. Note that you should select the cudatoolkit version most appropraite for your GPU; currently, we have "10.2", "11.0", "11.1", and "11.2" available.
140143

141144
.. code-block:: bash
142-
CONDA_CUDA_OVERRIDE="" mamba install tensorflow -c conda-forge
145+
CONDA_CUDA_OVERRIDE="11.2" conda install tensorflow -c conda-forge
143146
# OR
144147
CONDA_CUDA_OVERRIDE="11.2" mamba install tensorflow -c conda-forge
145148

0 commit comments

Comments
 (0)