Anaconda on DARWIN
$ vpkg_versions anaconda Available versions in package (* = default version): [/opt/shared/valet/2.1/etc/anaconda.vpkg_yaml] anaconda Open Enterprise Python * 5.3.1:python2 Anaconda Python2 5.3.1:python3 Anaconda Python3 2020.11:python3 Anaconda Python3 (Python 2 deprecated) 2022.05:python3 Anaconda Python3 (Python 2 deprecated) 2023.03:python3 Anaconda Python3 (Python 2 deprecated) 2024.02:python3 Anaconda Python3 (Python 2 deprecated)
See Recipes for examples of building virtual environments for specific packages.
Virtual Environment
If you are going to follow the instructions for creating an Anaconda virtual environment on DARWIN consider using a slight modification to the documentation provided by each software package and use VALET to load the proper version of Anaconda for Python 2 or Python 3, specify a path in your home ($HOME
) or workgroup ($WORKDIR
) directory not in the system path for Anaconda, and also ignore the warnings to update conda
as it is building your virtual environment.
See the example below which creates a virtual Anaconda environment based on Python 3 for FEniCS called fenicsproject
in the traine
home directory and installs all the fenics packages and mshr. Once the environment is created, then a simple interactive test is done on a compute node via the devel
partition to verify the new fenicsproject
Anaconda environment is working properly.
[traine@login00 ~]$ vpkg_devrequire anaconda/2024.02:python3 Adding package `anaconda/2024.02:python3` to your environment [traine@login00 ~]$ conda create -p ~/fenicsproject -c conda-forge fenics fenics-dijitso fenics-dolfin fenics-ffc fenics-fiat fenics-libdolfin fenics-ufl mshr Retrieving notices: ...working... done Channels: - conda-forge - defaults Platform: linux-64 Collecting package metadata (repodata.json): done Solving environment: done ## Package Plan ## environment location: /home/1201/fenicsproject added / updated specs: - fenics - fenics-dijitso - fenics-dolfin - fenics-ffc - fenics-fiat - fenics-libdolfin - fenics-ufl - mshr The following packages will be downloaded: ... ... ... Proceed ([y]/n)? y Preparing transaction: done Verifying transaction: done Executing transaction: done ... ... ... # # To activate this environment, use: # > conda activate /home/1201/fenicsproject # # To deactivate an active environment, use: # > conda deactivate # [traine@login00 ~]$ workgroup -g it_css [(it_css:traine)@login00 ~]$ salloc --partition=idle salloc: Pending job allocation 5275439 salloc: job 5275439 queued and waiting for resources salloc: job 5275439 has been allocated resources salloc: Granted job allocation 5275439 salloc: Waiting for resource configuration salloc: Nodes r1n00 are ready for job [traine@r1n00 ~]$ vpkg_devrequire anaconda/2024.02:python3 Adding package `anaconda/2024.02:python3` to your environment [traine@r1n00 ~]$ conda activate ~/fenicsproject (/home/1201/fenicsproject) [traine@r1n00 ~]$ python3 -c "import mshr" (/home/1201/fenicsproject) [traine@r1n00 ~]$ conda deactivate [traine@r1n00 ~]$ exit logout salloc: Relinquishing job allocation 5275439 [(it_css:traine)@login00 ~]$
Recipes
Examples documented as recipes to be used for specific installations including using a workgroup
directory as well as creating VALET packages for these environments and job scripts setup for batch runs, but can also perhaps help others in solving similar installation dilemmas.
- Gurobi Python Virtual Environments