Skip to content

Commit 7ddab8d

Browse files
authored
Enhance uenv docs (#36)
1 parent 9f814d1 commit 7ddab8d

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

docs/software/uenv.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ Each uenv is packaged in a single file (in the [Squashfs](https://docs.kernel.or
1010

1111
Each environment contains a software stack, comprised of compilers, libraries, tools and scientific applications - built using Spack.
1212

13-
!!! warning
14-
15-
This documentation is for the new uenv2 implementation of uenv, that is not yet installed on Alps.
13+
!!! warning "uenv on Eiger and Balfrin"
14+
15+
The uenv tool available on Eiger and Balfrin is a different version than the one described below. Some commands will be different.
16+
Please refer to `uenv --help` for the correct usage.
1617

1718
## Getting started
1819

@@ -150,6 +151,16 @@ The output above shows that there are 12 uenv (`prgenv-gnu`, `namd` , `cp2k` and
150151

151152
## Downloading uenv
152153

154+
!!! note
155+
In order to pull uenv images, a local directory for storing the images must first be created,
156+
otherwise you will receive an error message that the repository does not exist.
157+
158+
To create a repo in the default location, use the following command:
159+
160+
```terminal title="Create default uenv image reposiroty"
161+
> uenv repo create
162+
```
163+
153164
To use a uenv, it first has to be pulled from the registry to local storage where you can access it.
154165
For example, to use the `prgenv-gnu` uenv, use the uenv image pull command:
155166

@@ -164,15 +175,7 @@ For example, to use the `prgenv-gnu` uenv, use the uenv image pull command:
164175
> uenv image pull 3ea1945046d884ee
165176
```
166177

167-
!!! note
168-
In order to pull images, a local directory for storing the images must first be created, and you will receive an error message.
169-
To create a repo in the default location, use the following command:
170-
171-
```terminal title="uenv image repo"
172-
> uenv repo create
173-
```
174-
175-
Some images can be large, over 10 GB, and it can take a while to download from the registry.
178+
Some images can be large, over 10 GB, and it can take a while to download them from the registry.
176179

177180
To view all uenv that have been pulled, and are ready to use use the `uenv image ls` command:
178181

@@ -196,7 +199,7 @@ To view all uenv that have been pulled, and are ready to use use the `uenv image
196199

197200
By default, uenv can be pulled by all users on a system, with no restrictions.
198201

199-
Some uenv are not available to all users, for example the `vasp` images are only available for users with a VASP license, who are added to the `vasp` group once then have provided CSCS with a copy of their license.
202+
Some uenv are not available to all users, for example the `vasp` images are only available for users with a [VASP][ref-uenv-vasp] license, who are added to the `vasp` group once then have provided CSCS with a copy of their license.
200203

201204
To be able to pull such images a token that authorizes access must be provided.
202205
Tokens are created by CSCS, and stored on SCRATCH in a file that only users who have access to the software can read.
@@ -213,13 +216,13 @@ Tokens are created by CSCS, and stored on SCRATCH in a file that only users who
213216
As of March 2025, the only restricted software is VASP.
214217

215218
!!! note
216-
Better token management is under development - tokens will be stored in a central location and be easier to use.
219+
Better token management is under development - tokens will be stored in a central location and will be easier to use.
217220

218221
[](){#ref-uenv-start}
219222
## Starting a uenv session
220223

221224
The `uenv start` command will start a new shell with one or more uenv images mounted.
222-
This is very useful for interactive sessions, for example if you want to work in the terminal to compile an application, or set up a python virtual environment.
225+
This is very useful for interactive sessions, for example if you want to work in the terminal to compile an application, or set up a Python virtual environment.
223226

224227
!!! example "start an interactive shell to compile an application"
225228
Here we want to compile an MPI + CUDA application "affinity".
@@ -271,10 +274,10 @@ This is very useful for interactive sessions, for example if you want to work in
271274
SHELL=`which zsh` uenv start ...
272275
```
273276

274-
!!! warning "attention C Shell / tcsh users"
277+
!!! warning "C Shell / tcsh users"
275278
uenv is tested extensively with bash (the default shell), and zsh. C shell is not tested properly, and we won't make significant changes to uenv to maintain support for C shell.
276279

277-
If your are one of the handful of users using `tcsh` (c shell) and you want to use uenv, we strongly recommend creating a request at the [CSCS service desk](https://jira.cscs.ch/plugins/servlet/desk) to change to either bash or zsh as your default.
280+
If your are one of the handful of users using `tcsh` (C shell) and you want to use uenv, we strongly recommend creating a request at the [CSCS service desk](https://jira.cscs.ch/plugins/servlet/desk) to change to either bash or zsh as your default.
278281

279282
The basic syntax of uenv start is `uenv start image` where `image` is the uenv to start.
280283
The image can be a label, the hash/id of the uenv, or a file:
@@ -562,19 +565,18 @@ The command line tool can be installed from source, if you are working on a clus
562565

563566
Only follow these steps if you are advised to test out a new version (e.g. if it has a fix for an issues that you are encountering).
564567

565-
!!! example "manually installing uenv in the terminal"
566-
```bash
567-
git clone https://github.com/eth-cscs/uenv2.git
568-
cd uenv2
568+
```bash
569+
git clone https://github.com/eth-cscs/uenv2.git
570+
cd uenv2
569571

570-
# run the installation script.
571-
# this will install uenv2 in $HOME/.local/$(uname -m)/
572-
./install-alps-local.sh
572+
./install-alps-local.sh # (1)!
573573

574-
# update bashrc
575-
echo "export PATH=\$HOME/.local/\$(uname -m)/bin:\$PATH" >> $HOME/.bashrc
576-
echo "unset -f uenv" >> $HOME/.bashrc
577-
```
574+
# update bashrc
575+
echo "export PATH=\$HOME/.local/\$(uname -m)/bin:\$PATH" >> $HOME/.bashrc
576+
echo "unset -f uenv" >> $HOME/.bashrc
577+
```
578+
579+
1. Run installation script. This will install uenv in `$HOME/.local/$(uname -m)/bin/`.
578580

579581
!!! warning
580582
Before uenv can be used, you need to log out then back in again and type `which uenv` to verify that uenv has been installed in your `$HOME` path.

0 commit comments

Comments
 (0)