Skip to content
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

Preinstall AWB in lab image #483

Draft
wants to merge 2 commits into
base: python-3.10.11
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"AIIDALAB_VERSION": {
"default": "24.09.0"
},
"AWB_VERSION": {
"default": "2.3.0a2"
},
"AIIDALAB_HOME_VERSION": {
"default": "24.09.0"
}
Expand Down
4 changes: 4 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ variable "AIIDA_VERSION" {
variable "AIIDALAB_VERSION" {
}

variable "AWB_VERSION" {
}

variable "AIIDALAB_HOME_VERSION" {
}

Expand Down Expand Up @@ -88,6 +91,7 @@ target "lab" {
platforms = "${PLATFORMS}"
args = {
"AIIDALAB_VERSION" = "${AIIDALAB_VERSION}"
"AWB_VERSION" = "${AWB_VERSION}"
"AIIDALAB_HOME_VERSION" = "${AIIDALAB_HOME_VERSION}"
"PYTHON_MINOR_VERSION" = get_python_minor_version("${PYTHON_VERSION}")
}
Expand Down
11 changes: 5 additions & 6 deletions stack/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ LABEL maintainer="AiiDAlab Team <[email protected]>"

USER root

# build-essential: includes GCC compilers that are needed when building
# pip packages from sources, which often seems to happen for pymatgen:
# https://pymatgen.org/installation.html#installation-tips-for-optional-libraries
# rsync: needed to support the new AiiDA backup command
# povray: rendering engine used in aiidalab-widgets-base
ENV EXTRA_APT_PACKAGES "curl povray rsync build-essential"
ENV EXTRA_APT_PACKAGES "curl povray rsync"

# For ARM64 we need to install erlang as it is not available on conda-forge
# (this is needed later as rabbitmq dependency in base-with-services image,
# but we install it here so that we don't have to invoke apt multiple times.
# We also install build-essential, which includes GCC compilers that are needed when building
# pip packages from sources, which is more often needed on ARM64
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "arm64" ]; then \
EXTRA_APT_PACKAGES="erlang libhdf5-serial-dev pkg-config ${EXTRA_APT_PACKAGES}"; \
EXTRA_APT_PACKAGES="erlang build-essential libhdf5-serial-dev pkg-config ${EXTRA_APT_PACKAGES}"; \
fi;\
apt-get update --yes && \
apt-get install --yes --no-install-recommends ${EXTRA_APT_PACKAGES} && \
Expand Down Expand Up @@ -51,7 +50,7 @@ COPY pip.conf /etc/pip.conf
# Install aiida-core and other shared requirements.
RUN mamba update -y pip mamba zstandard async_generator certipy && \
mamba install --yes \
aiida-core==${AIIDA_VERSION} \
aiida-core.atomic_tools==${AIIDA_VERSION} \
mamba-bash-completion \
&& mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}"
Expand Down
3 changes: 2 additions & 1 deletion stack/lab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ ENV DOCKER_STACKS_JUPYTER_CMD=notebook
USER root
WORKDIR /opt/

# Install aiidalab package
ARG AIIDALAB_VERSION
ARG AWB_VERSION
RUN mamba install --yes \
aiidalab=${AIIDALAB_VERSION} \
aiidalab-widgets-base=${AWB_VERSION} \
&& mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down