Currently, AIFS is private, so you have two main ways to install the repo.
First, you use venv
or conda
to create your Python environment.
Try and get an up-to-date version of Python. On ATOS, with the module load conda
you can currently do that with:
conda create -n <best-name-ever> python=3.10 -c conda-forge |
Then once activated, you can pip-install AIFS in two ways:
AIFS has different installation modes. Currently, we have the installation without options, which is tuned for inference. This has a minimal set of dependencies.
There is a training option and an option for working on graphs. Those have to be defined at installation time to get the correct dependencies.
This one is great for development purposes because you can change the code and run it on changed codes.
So clone AIFS where you want to:
git clone git@github.com:ecmwf-lab/aifs-mono.git git checkout hackathon |
then you can install it locally.
Pip has an "editable" mode, where the changes from the local repo are directly used, otherwise, it caches the version, and you would have to re-install all the time.
If you cloned the repo into aifs-mono, you simply use:
pip install -e aifs-mono/ |
You can even install it out of the directory itself
pip install -e . |
which we'll use for the examples now. The fun part is, that you can now check out different branches, and they'll be used in your installation automatically. Always the "current files" pip has access to.
The cached install simply omits the -e
.
pip install . |
But is probably not what you want.
If you want to install AIFS for training, you add the option to the path:
pip install -e .[training] |
as an example.
We can also install it from the repo directly. This is particularly interesting for automated runs and inference.
No cloning necessary:
pip install git+https://github.com/ecmwf-lab/aifs-mono |
If we wanted to use install options on this one, the syntax is a little cumbersome. (Also, you can't edit the code.)
pip install git+https://github.com/ecmwf-lab/aifs-mono#egg=aifs[training] |
And you can install specific commits with the hash, branches, or tags with the @-notation
pip install git+https://github.com/ecmwf-lab/aifs-mono@<greatest-branch-ever>#egg=aifs[training] |
Some Stackoverflow reading at your leisure.