Versions Compared

Key

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

...

You can create your own conda environments with your own choice of packages.  You don't need to install your own conda software for this, you can reuse the existing LCLS conda software and use the "conda create" command that you can read about on the web to create your own environment.

One disadvantage of creating your own environments is that they can use significant disk space.  If you run into disk space issues send email to pcds-ana-l@slac.stanford.edu..  See the "Installation Area" section below for a special area that has been created to store conda envs.

If you want to create a new environment with a selected set of packages use a command like this (after sourcing the appropriate psana1/psana2 setup script).

Code Block
conda env create --name roottest root psana

If you want to get a conda environment with psana you can clone the psana environment into a local environment that you can control with a command like this (which will take some time because it has to copy several GB to the new environment):

Code Block
conda env create --nname my-ana-1.3.10 --clone ana-1.3.10

You can also create new (empty) environments without cloning: this is often easier since the psana package is big with quite a few dependencies.  You can see a list of available psana environments (to clone) like this:

...

Then activate your new environment with:

Code Block
sourceconda activate my-ana-1.3.10

Then install the conda-python package you want (potentially a specific version) using a command like:

...

Code Block
conda remove <packagename>

Installation Area

A special installation area has been created for users to install conda environments to avoid using up home-directory quota space.  Use commands similar to these to create your own environments.

Code Block
source /sdf/group/lcls/ds/ana/sw/conda1/manage/bin/psconda.sh  # for LCLS1 environments. replace "conda1" with "conda2" for LCLS2
# for the following 3 commands, change "my-h5-1.0.0" to the name of your environment
export CONDA_PKGS_DIRS=/sdf/group/lcls/ds/tools/conda_envs/my-h5-1.0.0/.pkgs # avoids storing large package files in your home directory
conda create --prefix /sdf/group/lcls/ds/tools/conda_envs/my-h5-1.0.0 --clone h5-1.0.0 # or "create" command from the previous section
chmod -R +r /sdf/group/lcls/ds/tools/conda_envs/my-h5-1.0.0 # make directory world-readable

Anaconda+pip

Some packages are not available from anaconda but they can be installed via pip (in this case the "rayopt" package):

...

NOTE: the virtualenv method is not compatible with our anaconda-based psana , (so not recommended as the first approach) but we leave the documentation here in case it is useful at some point.

A python virtualenv can be used to install python packages locally in your user account.  Some instructions are here.  Execute this command to create a new virtual environment (after setting up the psana the psana environment):

Code Block
virtualenv <directoryName>

...