Skip to content

Commit 187031f

Browse files
committed
Merge branch 'update-gpu-environment-setup' of https://github.com/nebari-dev/nebari-docs into update-gpu-environment-setup
2 parents 9cd1960 + b83f5d9 commit 187031f

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

docs/docs/how-tos/use-gpus.mdx

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,13 @@ Overview of using GPUs on Nebari including server setup, environment setup, and
3030

3131
## 2. Creating environments
3232

33-
By default, `conda-store` will build CPU-compatible packages. To build GPU-compatible packages, we do the following.
3433
### Build a GPU-compatible environment
35-
By default, `conda-store` will build CPU-compatible packages. To build GPU-compatible packages, we have two options:
36-
1. **Create the environment specification using `CONDA_OVERRIDE_CUDA` (recommended approach)**:
34+
Create the environment specification using `CONDA_OVERRIDE_CUDA`:
3735

3836
Conda-store provides an alternate mechanism to enable GPU environments via the setting of an environment variable as explained in the [conda-store docs](https://conda.store/conda-store-ui/tutorials/create-envs#set-environment-variables).
3937
While creating a new config, click on the `**GUI <-> YAML**` Toggle to edit yaml config.
4038
```
4139
channels:
42-
- pytorch
4340
- conda-forge
4441
dependencies:
4542
- pytorch
@@ -57,41 +54,6 @@ At the time of writing this document, the latest CUDA version was showing as `12
5754
Please ensure that your choice from PyTorch documentation is not greater than the highest supported version in the `nvidia-smi` output (captured above).
5855
:::
5956

60-
2. **Create the environment specification based on recommendations from the PyTorch documentation**:
61-
You can check [PyTorch documentation](https://pytorch.org/get-started/locally/) to get a quick list of the necessary CUDA-specific packages.
62-
Select the following options to get the latest CUDA version:
63-
- PyTorch Build = Stable
64-
- Your OS = Linux
65-
- Package = Conda
66-
- Language = Python
67-
- Compute Platform = 12.1 (Select the version that is less than or equal to the `nvidia-smi` output (see above) on your server)
68-
69-
![pytorch-linux-conda-version](/img/how-tos/pytorch-linux-conda-version.png)
70-
71-
The command `conda install` from above is:
72-
```
73-
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
74-
```
75-
The corresponding yaml config would be:
76-
```
77-
channels:
78-
- pytorch
79-
- nvidia
80-
- conda-forge
81-
dependencies:
82-
- pytorch
83-
- pytorch-cuda==12.1
84-
- torchvision
85-
- torchaudio
86-
- ipykernel
87-
variables: {}
88-
```
89-
:::note
90-
The order of the channels is respected by conda, so keep pytorch at the top, then nvidia, then conda-forge.
91-
92-
You can use `**GUI <-> YAML**` Toggle to edit the config.
93-
94-
9557
## 3. Validating the setup
9658
You can check that your GPU server is compatible with your conda environment by opening a Jupyter Notebook, loading the environment, and running the following code:
9759
```

0 commit comments

Comments
 (0)