Skip to content

Preinstall AWB in lab image#483

Merged
danielhollas merged 2 commits into
mainfrom
awb
Jun 3, 2026
Merged

Preinstall AWB in lab image#483
danielhollas merged 2 commits into
mainfrom
awb

Conversation

@danielhollas

@danielhollas danielhollas commented Jul 20, 2024

Copy link
Copy Markdown
Contributor

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 danielhollas force-pushed the awb branch 2 times, most recently from b3a34e9 to 1f243e1 Compare May 1, 2026 13:43
@danielhollas

danielhollas commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

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)

@danielhollas danielhollas force-pushed the awb branch 2 times, most recently from 5a7e94e to bf4bc74 Compare May 21, 2026 22:29
@danielhollas danielhollas added the blocked This issue/PR is blocked by another issue/PR. label May 21, 2026
@danielhollas danielhollas marked this pull request as ready for review May 21, 2026 23:14
@danielhollas danielhollas removed the blocked This issue/PR is blocked by another issue/PR. label May 28, 2026

@edan-bainglass edan-bainglass left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @danielhollas. When you say "the big disadvantage is the size of the image" - how big?

@danielhollas

Copy link
Copy Markdown
Contributor Author

Thanks @edan-bainglass

(this is staged on top of #479 so not merging yet). Also would like to get green light from @yakutovicha

Base automatically changed from nbclassic to main June 3, 2026 14:29

@yakutovicha yakutovicha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

@danielhollas danielhollas enabled auto-merge (rebase) June 3, 2026 22:25
@danielhollas danielhollas merged commit 102e2d0 into main Jun 3, 2026
32 of 36 checks passed
@danielhollas danielhollas deleted the awb branch June 3, 2026 22:26
danielhollas added a commit that referenced this pull request Jun 3, 2026
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.

scipy from conda, for correct BLAS/LAPACK operations in arm64

3 participants