Skip to content

Commit

Permalink
fix conda tips (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
sellth authored Jul 22, 2024
1 parent 4d47540 commit a073d7c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions bih-cluster/docs/storage/migration-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,31 +74,30 @@ There are numerous ways around this problem which are described [here](https://w

A simple solution we can recommend is this:

1. Export all environments prior to the move with this bash script:
1. Before the move, activate your old conda installation like so:
```sh
$ source /fast/work/users/$USER/{your_conda_folder}/bin/activate
```

2. Export all environments with this bash script:
```sh
#!/bin/bash
for env in $(ls $(conda info --base)/envs/)
do
conda env export -n $env -f $env.yml
done

```
If you run into errors it might be better to use `conda env export -n $env --no-builds -f $env.yaml`.

2. Install a fresh version of conda or mamba in your new work folder.
3. Install a fresh version of conda or mamba in your new work folder.
Don't forget to turn off automatic base environment activation for less delay during login and reduced strain on the login nodes.
```sh
$ conda init
$ conda config --set auto_activate_base false
```

3. Re-create your old environments from the yaml files:
4. Re-create your old environments from the yaml files:
```sh
$ conda env create -f {environment.yml}
```

!!! Note "Tip"
If we already moved your home folder, you can still activate your old environments like this:

```sh
$ conda activate /fast/home/users/your-user/path/to/conda/envs/{env-name-here}
```

0 comments on commit a073d7c

Please sign in to comment.