Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

More information on managing Conda environments can be found here. Begin by following the steps above for the single environment but do not set the environment variables (i.e. step 10). It is recommended to have these variables set when the environment is activated and unset when deactivated. First create the environment with conda --create <environment name> -c lcls-rhel<num> psana-conda where <environment name> is the name of the environment to be created and <num> is the RHEL version. Then follow the steps below, for a given environment testenv examplenv, which were pulled from the link given before.

  1. Change directories to the environment directories like cd ~/miniconda2/env/testenvexamplenv (the actual path may be slightly different but it will be under env in the conda package
  2. Create the following directories and files:
    1. mkdir -p etc/conda/activate.d
    2. mkdir -p etc/conda/deactivate.d
    3. touch etc/conda/activate.d/env_vars.sh
    4. touch etc/conda/deactivate.d/env_vars.sh
  3. Add the following to this files
    1. To etc/conda/activate.d/env_vars.sh: 

       

      Code Block
      #!/bin/sh
      
      export SIT_DATA=$HOME/psdm/data
      export SIT_PSDM_DATA=$HOME/psdm
    2. To /etc/conda/deactivate.d/env_vars.sh:

      Code Block
      #!/bin/sh
      
      unset SIT_DATA
      unset SIT_PSDM_DATA

...

Now testenvexamplenv will have the correct environment variables when activated. And packages may be added, removed, upgraded, downgraded, etc. from this conda environment like usual. For information on this, follow link given at the beginning of this section.

...