Migrating to Pixi-Powered SalishSeaCmd
If you are running NEMO on one of the Alliance HPC clusters,
an easy way to start using Pixi is to migrate your SalishSeaCmd installation
and workflow to Pixi.
The steps are:
Install Pixi on the Alliance cluster (if you have not already done so)
Pull the most recent version of
SalishSeaCmdfrom GitHubUse Pixi to to create an isolated environment for
SalishSeaCmdUse pixi run salishsea run... to launch a run
Clean up the elements of your old conda-powered installation
Install Pixi
$ curl -fsSL https://pixi.sh/install.sh | bash
Having Pixi autocomplete its sub-commands,
option flags,
environment names,
etc.
when you hit Tab is very convenient.
To enable that,
add the following line to your $HOME/.bashrc file:
eval "$(pixi completion --shell bash)"
After installation, please restart your terminal session to finalize the installation.
Update SalishSeaCmd
$ cd $HOME/SalishSeaCmd/
$ git pull
Note
Depending on when you set up SalishSeaCmd on the cluster,
it is possible that its path is different to $HOME/MEOPAR/SalishSeaCmd/.
The next most likely possibility is $PROJECT/$USER/MEOPAR/SalishSeaCmd/.
Create the SalishSeaCmd Environment
$ pixi install
Use pixi run salishsea run...
When you are in the SalishSeaCmd/ directory
(or a sub-directory)
you can run the salishsea command with with the pixi run command.
Example:
$ pixi run salishsea help
A common use-case is to execute the salishsea run command in the directory containing
your run description YAML file.
To accomplish that,
you have to tell Pixi where to find the SalishSeaCmd/ directory so that it can use the
correct environment.
You do that by using the -m or --manifest option of pixi run.
Example:
$ cd SS-run-sets/SalishSea/sea/Carbon_v202111/
$ pixi run -m $HOME/MEOPAR/SalishSeaCmd salishsea run 01jan11_Lb80.yaml \
/scratch/allen/Carbon/MoreSens/Now/01jan11/
Cleanup
Uninstall
SalishSeaCmdfrom$HOME/.local/bin/$ conda activate salishsea-cmd $ python -m pip uninstall SalishSeaCmd
Uninstall
NEMO-Cmdfrom$HOME/.local/bin$ python -m pip uninstall NEMO-Cmd
Remove your
salishsea-cmdconda environment$ conda deactivate $ conda env remove -n salishsea-cmd
Remove your
NEMO-Cmdrepository cloneInstallation and updating of
NEMO-Cmdis now handled by Pixi becauseNEMO-Cmdis now an implicit dependency forSalishSeaCmdin its manifest file. So, you can remove yourNEMO-Cmdrepository clone:$ rm -rf $HOME/MEOPAR/NEMO-Cmd/
Note
Depending on when you set up
SalishSeaCmdon the cluster, it is possible that the path is different to$HOME/MEOPAR/NEMO-Cmd/. The next most likely possibility is$PROJECT/$USER/MEOPAR/NEMO-Cmd/.Remove
NEMO-Cmdfrom thevcs revisions:sections of your run description YAML files.If you don’t you will get warnings like:
every time you use pixi run salishsea run ...
Remove conda (if the only environment left is
base)If the output of:
$ conda env list
shows only the
baseenvironment like:follow the Uninstall instructions for Miniforge to remove it.
If you have environments in addition to
baseleft, migrate them to Pixi before you remove conda. Please contact Doug if you need help.