Skip to content

Commit

Permalink
Pre-install app by aiidalab install (aiidalab#532)
Browse files Browse the repository at this point in the history
The pre-installation of the app is through running aiidalab install from local folder, instead of using pip install, this mimics the installation operation from AppStore and prevents issues such as after removing setup.py the dependencies are not found.

The missing `setup.py` is reverted back to avoid the app installation failing in the old version of image.
  • Loading branch information
unkcpz authored Oct 23, 2023
1 parent bfcf247 commit 13557c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- .github/actions/load-image/action.yml

- src/**
- docker/**
- qe.ipynb
- setup.cfg
- pyproject.toml
Expand All @@ -40,6 +41,7 @@ on:
- .github/actions/load-image/action.yml

- src/**
- docker/**
- qe.ipynb
- setup.cfg
- pyproject.toml
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# syntax=docker/dockerfile:1
FROM base-image


# Copy whole repo and pre-install the dependencies and app to the tmp folder.
# In the before notebook scripts the app will be re-installed by moving it to the app folder.
ENV PREINSTALL_APP_FOLDER ${CONDA_DIR}/aiidalab-qe
Expand All @@ -12,7 +11,8 @@ USER ${NB_USER}
RUN cd ${PREINSTALL_APP_FOLDER} && \
# Remove all untracked files and directories. For example the setup lock flag file.
git clean -fx && \
pip install . --no-cache-dir && \
# It is important to install from `aiidalab install` to mimic the same installation operation from the app store.
aiidalab install --yes --python "/opt/conda/bin/python" "quantum-espresso@file://${PREINSTALL_APP_FOLDER}" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import setuptools

setuptools.setup()

0 comments on commit 13557c6

Please sign in to comment.