-
Notifications
You must be signed in to change notification settings - Fork 24
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
30 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 77da491
Merge branch 'main' into image-fix-pip
danielhollas ad29f75
Install vibroscopy with uv
danielhollas 38e90bf
Workaround for euphonic arm build
danielhollas bad4715
Install euphonic via conda
danielhollas fce6af0
Don't install euphonic from conda
danielhollas 903b2cc
Bump aiidalab-qe-vibroscopy in the image
danielhollas 88dca93
Temporarily point to fork for vibroscopy app
danielhollas b8c388a
Update muon plugin as well
danielhollas 7228e57
Bump uv
danielhollas 769871a
Use home_build uv cache in final build
danielhollas ff4358d
Install euphonic separately
danielhollas d73987a
Make wget less noisy
danielhollas de5b60b
--no-build-isolation for euphonic
danielhollas 1c9eaab
Add comment, get rid of uv warning
danielhollas 8ff0a69
Use aiidalab-qe-vibroscopy from PyPI
danielhollas aaa0b91
Try uv envs
danielhollas a4f15c8
Come on euphonic
danielhollas dcb69e9
Revert "Try uv envs"
danielhollas d382ac4
Reduce diff
danielhollas 7c24eda
Fix
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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. | ||||||
|
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/ | ||||||
|
|
||||||
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.
Uh oh!
There was an error while loading. Please reload this page.