-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move QE conda install into separate stage #783
Conversation
When building the QEApp Docker container, the Quantum Espresso installation into a conda environment is a step that's completely independent from the others. By putting it into a separate Docker build stage, it can be build in parallel (when using buildkit), as: DOCKER_BUILDKIT=1 docker build .
# Install QE into conda environment in /opt/conda | ||
# This step is independent from the others and can be run in parallel. | ||
FROM ghcr.io/aiidalab/full-stack:${FULL_STACK_VER} AS qe_conda_env | ||
ARG QE_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed so that the variables are passed from the top level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, learned. I was always defined in the stage and don't know how to move all ARGs to the front of file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's definitely not obvious, took me a while to figure out.
uv pip install --system --no-cache . && \ | ||
fix-permissions "${CONDA_DIR}" && \ | ||
fix-permissions "/home/${NB_USER}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed since the uv pip install --system
does not touch the home directory.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #783 +/- ##
=======================================
Coverage 68.28% 68.28%
=======================================
Files 45 45
Lines 4143 4143
=======================================
Hits 2829 2829
Misses 1314 1314
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
# Install QE into conda environment in /opt/conda | ||
# This step is independent from the others and can be run in parallel. | ||
FROM ghcr.io/aiidalab/full-stack:${FULL_STACK_VER} AS qe_conda_env | ||
ARG QE_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, learned. I was always defined in the stage and don't know how to move all ARGs to the front of file.
When building the QEApp Docker container, the Quantum Espresso installation into a conda environment is a step that's completely independent from the others. By putting it into a separate Docker build stage, it can be build in parallel (when using buildkit), as:
Also added a
.dockerignore
file. This is important since we're copying the whole directory into the container and we don't want to copy junk inside. Even if we later rungit clean
, once the files are copied, that stay in the fs layers.Extracted from #781