From 11d4fa97a21a94b2427ac5f2624502408cab2892 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 22 Jul 2024 13:33:19 +0200 Subject: [PATCH] fix conda tips --- bih-cluster/docs/storage/migration-faq.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/bih-cluster/docs/storage/migration-faq.md b/bih-cluster/docs/storage/migration-faq.md index aa3ecc16a..cbd93cfba 100644 --- a/bih-cluster/docs/storage/migration-faq.md +++ b/bih-cluster/docs/storage/migration-faq.md @@ -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. Activate your old conda installation like so: +``` +$ source /fast/work/users/$USER/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} - ```