...
Code Block |
---|
# after activating <mycondaenv> and installed the needed prerequisites of PACKAGE from CINECA channel, install the additional conda packages conda install PACKAGE # create a virtual env and install the additional pip packages python -m venv <myvenv> --system-site-packages source <myvenv>/bin/activate pip install PACKAGE |
NOTES:
- <mycondaenv>: choose an arbitrary, up-to-you name for your personal conda env
- install the selected packages from the $CINECA_AI_CHANNEL
- install the additional packages (specifying specific external channels if needed, e.g. conda-forge)
- <myvenv>: choose an arbitrary, up-to-you name for your personale conda env
- the --system-site-packages flag gives the virtual environment access to the system site-packages directory (otherwise you cannot access the cineca-ai environment)
- it is advised to create both personal envs in your $WORK area, since the $HOME disk quota is limited to 50 GB
- to test the installation launch: python -c "import PACKAGE"
- to use the installed PACKAGE, just source your env (source <myvenv>/bin/activate): you will access your packages AND those of the cineca-ai environment, no need to load the cineca-ai module and to activate <mycondaenv>
Example: netket
It requires some of the conda packages provided by the cineca-ai environment, and netket is only available via pip.
$ module load autoload cineca-ai/2.1.0
$ conda create --prefix <mycondaenv> -y
$ conda activate <mycondaenv>
$ conda install -c $CINECA_AI_CHANNEL mpi4py jaxlib jax dm-tree mpi4jax
$ conda install cmake h5py -y
$ conda install -c conda-forge llvmlite>=0.38.0 orjson -y
$ python -m venv <myvenv> --system-site-packages
$ source <myvenv>/bin/activate
$ pip install 'git+https://github.com/netket/netket.git#egg=netket[all]'
NOTES:
...
3. clone the CINECA channel in your personal channel
...