I moved all the package's dependencies installations to conda, so now they can all live in a YML file (env/deeprank.yml) which is used for building the environment. Both the CI and the user's installations are much smoother and cleaner now.
We use a new conda-incubator action for creating a conda env in the CI which allows you to provide a YML file for building the env.
This is much more convenient now that we use the YML file for almost everything. The action uses mamba - a drop-in replacement for conda that is generally faster and better at resolving dependencies. See here for more details about it.
For the Docker installation, I added two completely separated files in env/ (deeprank2-docker.yml and requirements-docker.txt). The issue was that while in the CI we want to be able to set up the python version from outside the YML file, to test multiple versions (see also issue #540). But in the Dockerfile we need to create the env and install the dependencies (python included) in one go, and I didn't find any way to include both the python version in the mamba/conda command AND the YML input file for the env. If I create an environment specifying python 3.10 for example, it gets then very tricky to activate it during the creation of the image itself for updating it and installing the deps listed in the YML (I concluded that it's not possible or at least not the standard way to go). I had to do the same for the TXT file since in the Docker env creation we need to have installed deeprank2 as well (but in the CI we want to decouple that as well). If this is not clear enough or you have ideas for improving we can have a chat of course!
For testing (not required, I did it already, but a double check doesn't hurt)
Follow the instructions for the Docker container
Try to setup the env with the new procedure and run the tests locally
coverage: 83.613% (+0.1%) from 83.499%
when pulling 43fb72d0b1828fb34c03ae3887a2407fcae717c2 on 559_conda_migration_gcroci2
into 39bceaeb49503605c9e0ad34ba4589501565b300 on main.
With this PR:
env/deeprank.yml
) which is used for building the environment. Both the CI and the user's installations are much smoother and cleaner now.deeprank2-docker.yml
andrequirements-docker.txt
). The issue was that while in the CI we want to be able to set up the python version from outside the YML file, to test multiple versions (see also issue #540). But in theDockerfile
we need to create the env and install the dependencies (python included) in one go, and I didn't find any way to include both the python version in the mamba/conda command AND the YML input file for the env. If I create an environment specifying python 3.10 for example, it gets then very tricky to activate it during the creation of the image itself for updating it and installing the deps listed in the YML (I concluded that it's not possible or at least not the standard way to go). I had to do the same for the TXT file since in the Docker env creation we need to have installed deeprank2 as well (but in the CI we want to decouple that as well). If this is not clear enough or you have ideas for improving we can have a chat of course!