-
Notifications
You must be signed in to change notification settings - Fork 23
Don't install pypi packages to ~/.local #1337
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
Open
danielhollas
wants to merge
10
commits into
main
Choose a base branch
from
image-fix-pip
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6f6677d
Don't install pypi packages to ~/.local
danielhollas 034434b
Exclude '.cache' directory from home.tar
danielhollas 65825bc
Point to origin
danielhollas a69d7d0
Install vibroscopy with uv
danielhollas 6967356
Unpin spglib
danielhollas f98b13d
pip install aiida-bader
danielhollas 7161641
Install vibroscopy via pip
danielhollas 0cf153d
pip install vibroscopy
danielhollas b6e560d
Try this?
danielhollas 88b9bd8
Test python 3.12 and aiida-core=2.8.0 (#1466)
danielhollas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |||||
| # 1) Global ARGs | ||||||
| ############################################################################### | ||||||
| ARG FULL_STACK_VER=2025.1027 | ||||||
| ARG UV_VER=0.8.4 | ||||||
| ARG UV_VER=0.11.1 | ||||||
| ARG QE_VER=7.4 | ||||||
| ARG QE_DIR=/opt/conda/envs/quantum-espresso-${QE_VER} | ||||||
| ARG HQ_VER=0.19.0 | ||||||
|
|
@@ -17,13 +17,10 @@ ARG UV_CACHE_DIR=/tmp/uv_cache | |||||
| ARG QE_APP_SRC=/tmp/quantum-espresso | ||||||
| ARG COMPUTER_LABEL="localhost" | ||||||
|
|
||||||
| # | ||||||
| # We'll define the possible HQ download URLs (for x86_64 and ARM64). | ||||||
| # | ||||||
| ARG HQ_URL_AMD64="https://github.com/It4innovations/hyperqueue/releases/download/v${HQ_VER}/hq-v${HQ_VER}-linux-x64.tar.gz" | ||||||
| ARG HQ_URL_ARM64="https://github.com/It4innovations/hyperqueue/releases/download/v${HQ_VER}/hq-v${HQ_VER}-linux-arm64-linux.tar.gz" | ||||||
| ARG VIBROSCOPY_PKG="aiidalab-qe-vibroscopy@git+https://github.com/mikibonacci/aiidalab-qe-vibroscopy@v1.2.0" | ||||||
| ARG MUON_PKG="aiidalab-qe-muon@git+https://github.com/mikibonacci/aiidalab-qe-muon@v1.0.0" | ||||||
| ARG VIBROSCOPY_PKG="aiidalab-qe-vibroscopy@git+https://github.com/aiidalab/aiidalab-qe-vibroscopy@v1.2.1" | ||||||
| ARG MUON_PKG="aiidalab-qe-muon@git+https://github.com/aiidalab/aiidalab-qe-muon@v1.0.1" | ||||||
| ARG AIIDA_HQ_PKG="aiida-hyperqueue~=0.3.0" | ||||||
|
|
||||||
| ############################################################################### | ||||||
|
|
@@ -112,7 +109,8 @@ ENV UV_CONSTRAINT=${PIP_CONSTRAINT} | |||||
| # Install the aiida-hyperqueue | ||||||
| RUN --mount=from=uv,source=/uv,target=/bin/uv \ | ||||||
| --mount=from=build_deps,source=${UV_CACHE_DIR},target=${UV_CACHE_DIR},rw \ | ||||||
| uv pip install --system --strict --cache-dir=${UV_CACHE_DIR} ${AIIDA_HQ_PKG} | ||||||
| uv pip install --system --strict --cache-dir=${UV_CACHE_DIR} \ | ||||||
| ${AIIDA_HQ_PKG} ${MUON_PKG} aiida-bader | ||||||
|
|
||||||
| COPY ./before-notebook.d/* /usr/local/bin/before-notebook.d/ | ||||||
|
|
||||||
|
|
@@ -127,18 +125,16 @@ RUN --mount=from=qe_conda_env,source=${QE_DIR},target=${QE_DIR} \ | |||||
| verdi code create core.code.installed --label python --computer=localhost --default-calc-job-plugin pythonjob.pythonjob --filepath-executable=/opt/conda/bin/python -n && \ | ||||||
| verdi code create core.code.installed --label bader --computer=localhost --default-calc-job-plugin bader.bader --filepath-executable=${QE_DIR}/bin/bader -n && \ | ||||||
| verdi code create core.code.installed --label wannier90 --computer=localhost --default-calc-job-plugin wannier90.wannier90 --filepath-executable=/opt/conda/bin/wannier90.x -n && \ | ||||||
| # Additional plugins | ||||||
| pip uninstall -y phonopy && \ | ||||||
| pip install aiida-bader ${VIBROSCOPY_PKG} ${MUON_PKG} && \ | ||||||
| pip install --no-user ${VIBROSCOPY_PKG} && \ | ||||||
| # run post_install for plugin | ||||||
| python -m aiida_bader post-install && \ | ||||||
| python -m aiidalab_qe_vibroscopy setup-phonopy && \ | ||||||
| python -m aiidalab_qe_muon setup-python3 && \ | ||||||
| # wannier90 plugin need SSSP 1.1 | ||||||
| # Install this earlier as part of the pseudo installation | ||||||
| aiida-pseudo install sssp -v 1.1 -x PBE && \ | ||||||
| aiida-pseudo install sssp -v 1.1 -x PBEsol && \ | ||||||
| verdi daemon stop && \ | ||||||
| pip install spglib==2.5.0 && \ | ||||||
| mamba run -n aiida-core-services pg_ctl stop && \ | ||||||
| touch /home/${NB_USER}/.FLAG_HOME_INITIALIZED && \ | ||||||
| # NOTE: The work folder is empty but if included clashes with the work folder in a Renku | ||||||
|
|
@@ -147,7 +143,7 @@ RUN --mount=from=qe_conda_env,source=${QE_DIR},target=${QE_DIR} \ | |||||
| # It is usually safe (and preferable) to let .conda be recreated on the fly each time, | ||||||
| # because .conda typically just holds local environment information, caches, or references | ||||||
| # to available environments. | ||||||
| cd /home/${NB_USER} && tar -cf /opt/conda/home.tar --exclude work --exclude .conda . | ||||||
| cd /home/${NB_USER} && tar -cf /opt/conda/home.tar --exclude .cache --exclude work --exclude .conda . | ||||||
|
|
||||||
| ############################################################################### | ||||||
| # 6) Final stage | ||||||
|
|
@@ -166,19 +162,27 @@ ARG MUON_PKG | |||||
|
|
||||||
| USER ${NB_USER} | ||||||
| WORKDIR /tmp | ||||||
| # Install python dependencies | ||||||
|
|
||||||
| # Install common dependencies such as pymatgen and pandas via conda, | ||||||
| # to avoid building them when installing via pip | ||||||
| # TODO: Remove this once it is part of the full-stack image. | ||||||
| RUN mamba install aiida-core.atomic_tools --y && \ | ||||||
| mamba clean --all -f -y | ||||||
|
|
||||||
| # Install dependencies in the final image. | ||||||
| # It is important that these are installed in /opt/conda, not ~/.local | ||||||
| # Use uv cache from the previous build step | ||||||
| # # Install the aiida-hyperqueue | ||||||
| # NOTE: uv refuses the install aiidalab-qe-vibroscopy due to invalid RECORD file, | ||||||
| # pyproject.toml is likely invalid as it contains direct git dependency. | ||||||
|
Comment on lines
+175
to
+176
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been fixed
Suggested change
|
||||||
| ENV UV_CONSTRAINT=${PIP_CONSTRAINT} | ||||||
| RUN --mount=from=uv,source=/uv,target=/bin/uv \ | ||||||
| --mount=from=build_deps,source=${UV_CACHE_DIR},target=${UV_CACHE_DIR},rw \ | ||||||
| --mount=from=build_deps,source=${QE_APP_SRC},target=${QE_APP_SRC},rw \ | ||||||
| uv pip install --strict --system --compile-bytecode --cache-dir=${UV_CACHE_DIR} \ | ||||||
| ${QE_APP_SRC} ${AIIDA_HQ_PKG} | ||||||
| # Install plugins in the final image | ||||||
| RUN pip install aiida-bader ${VIBROSCOPY_PKG} ${MUON_PKG} && \ | ||||||
| mamba install scipy==1.13.1 --y && \ | ||||||
| mamba clean --all -f -y | ||||||
| ${QE_APP_SRC} aiida-bader ${AIIDA_HQ_PKG} ${MUON_PKG} | ||||||
|
|
||||||
| # This fails on arm with `uv pip` so is installed separately | ||||||
| RUN pip install --no-user ${VIBROSCOPY_PKG} | ||||||
|
|
||||||
| # copy hq binary | ||||||
| COPY --from=home_build /opt/conda/hq /usr/local/bin/ | ||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@edan-bainglass @mikibonacci please verify that these repositories are in sync.
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.
Not sure what you mean by in sync. As far as I can see, after moving vibroscopy under the AiiDAlab team, development has only continued there. Correct me if I'm wrong there @mikibonacci.
However, the opposite appears to be true for Muons 🤔
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.
I guess this is what I meant 😉 When I looked originally, it looked like the active development was done on private repo's and not those that are under aiidalab org.
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.
@mikibonacci can you clarify? 🙏