Skip to content

Preinstall AWB in lab image#483

Draft
danielhollas wants to merge 2 commits intonbclassicfrom
awb
Draft

Preinstall AWB in lab image#483
danielhollas wants to merge 2 commits intonbclassicfrom
awb

Conversation

@danielhollas
Copy link
Copy Markdown
Contributor

@danielhollas danielhollas commented Jul 20, 2024

The goal here is to pre-install AWB into the image from a conda package to:

  • speed up the installation of apps that depend on AWB
  • make the image more robust by pre-installing the often-used dependencies into the conda environment so that they don't need to be installed from PyPI by pip into ~/.local
  • relatedly, this PR also proposes to pre-install the atomic_tools extras from aiida-core which share a lot of the packages with AWB (e.g. ase) and so it is generally good to ensure that the supported versions are compatible with each other. Also, atomic_tools includes pymatgen and scipy, which we had issues with installing from PyPI before (see scipy from conda, for correct BLAS/LAPACK operations in arm64 #526)

Obviously, the big disadvantage is the size of the image, but to me the increase stability seems worth it. Also, applications dependending on AWB (like QeApp) would end up installing the packages anyways, and installing them from conda is actually generally more efficient since conda packages do not vendor non-python code).

NOTE: We cannot pin the exact AWB version, because apps need to be able to upgrade or even downgrade the pre-installed version according to their needs. But the thesis is that most of the AWB dependencies are not changed in between AWB versions and so it still makes sense to have them pre-installed. We probably can specify the lowest supported AWB version (which since this is build on the python 3.12 image will be AWB 3.0)

Staged on top of #455

Closes #526

@danielhollas
Copy link
Copy Markdown
Contributor Author

For some reason ASE on conda-forge depends on flask, which bring in a ton of other dependencies. I opened a PR on the ASE feedstock to remove it
conda-forge/ase-feedstock#59

@danielhollas danielhollas changed the base branch from main to nbclassic April 14, 2026 11:14
Comment thread stack/lab/Dockerfile
@danielhollas
Copy link
Copy Markdown
Contributor Author

danielhollas commented May 1, 2026

Faling tests are because of pip check

E Exception: Command docker compose -f "stack/docker-compose.lab.yml" -p "pytest2074" exec -T aiidalab pip check returned 1: """aiidalab-widgets-base 3.0.0a0 has requirement nglview>=3.0.8,~=3.0, but you have nglview 0.0.0.
""".
/opt/hostedtoolcache/Python/3.12.13/arm64/lib/python3.12/site-packages/pytest_docker/plugin.py:37: Exception

Looks like bad metadata of nglview package on conda-forge. This should be fixed if we can update to nglview 4.0 (aiidalab/aiidalab-widgets-base#742)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant