Skip to content

Commit 1f64885

Browse files
authored
formating and fixes
1 parent 6f1df7b commit 1f64885

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/user/tipsandtricks.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,16 @@ Installing CUDA-enabled packages like TensorFlow and PyTorch
139139

140140
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-only 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 their 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` to install GPU packages on the login node to be used later on the compute node. At the time of writing (February 2022), we have concluded 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 or issues with this.
141141

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.
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.
143+
144+
.. code-block:: shell
143145
144-
.. code-block:: bash
145146
CONDA_CUDA_OVERRIDE="11.2" conda install tensorflow -c conda-forge
146147
# OR
147148
CONDA_CUDA_OVERRIDE="11.2" mamba install tensorflow -c conda-forge
148149
150+
.. note::
151+
152+
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.
153+
149154
For context, for TensorFlow 2.7.0, `CONDA_CUDA_OVERRIDE="11.2" mamba install tensorflow -c conda-forge` results in approximately 2 GB to download while `CONDA_CUDA_OVERRIDE="11.2" mamba install tensorflow=2.7.0=cpu* -c conda-forge` results in approximately 200 MB to download. That is a significant storage wasted if one only needs the `-cpu` variant!

0 commit comments

Comments
 (0)