Skip to content

Commit 05876df

Browse files
committed
Merge branch 'main' into python-3.10.11
2 parents 98886fd + d45cf6c commit 05876df

File tree

9 files changed

+59
-95
lines changed

9 files changed

+59
-95
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
timeout-minutes: 120
2828

2929
outputs:
30-
images: ${{ steps.bake_metadata.outputs.images }}
30+
images: ${{ steps.set-output.outputs.result }}
3131

3232
# Make sure we fail if any command in a piped command sequence fails
3333
defaults:
@@ -77,15 +77,32 @@ jobs:
7777
build.json
7878
.github/workflows/env.hcl
7979
80-
- name: Set output image names
81-
id: bake_metadata
82-
# bake-action metadata output has gotten too big, so we first write it
83-
# to a file. See https://github.com/aiidalab/aiidalab-docker-stack/issues/491
84-
run: |
85-
cat << EOF > bake_metadata.json
86-
${{ steps.build-upload.outputs.metadata }}
87-
EOF
88-
images=$(.github/workflows/extract-image-names.sh bake_metadata.json)
89-
echo "images=${images}" >> "${GITHUB_OUTPUT}"
90-
# Pretty-print for GHA logs
91-
echo "$images" | jq
80+
- name: Set output variables
81+
id: set-output
82+
uses: actions/github-script@v7
83+
with:
84+
# We need to produce the following JSON string from the bake action output,
85+
# which is then used in follow-up steps to uniquelly identify the built
86+
# images by their digests, and not by their tags. See e.g. test.yml
87+
# {
88+
# "BASE_IMAGE": "ghcr.io/aiidalab/base@sha256:bc53c...",
89+
# "BASE_WITH_SERVICES_IMAGE":"ghcr.io/aiidalab/base-with-services@sha256:0df1...",
90+
# "FULL_STACK_IMAGE":"ghcr.io/aiidalab/full-stack@sha256:dd04...",
91+
# "LAB_IMAGE":"ghcr.io/aiidalab/lab@sha256:e8c7b3a662660ad20fef7...",
92+
# }
93+
script: |
94+
const bake_output = JSON.parse(process.env.BAKE_METADATA, 'utf-8');
95+
images = {};
96+
for (const key in bake_output) {
97+
const image = bake_output[key];
98+
// turn e.g. 'full-stack' to 'FULL_STACK_IMAGE' key
99+
const image_envvar = `${key.toUpperCase().replace(/-/g, "_")}_IMAGE`;
100+
// create full canonical path to the image using its digest, i.e.
101+
// ghcr.io/aiidalab/base@sha256:cdad93278a...
102+
const image_digest = `${image["image.name"]}@${image["containerimage.digest"]}`;
103+
images[image_envvar] = image_digest;
104+
}
105+
console.log(images);
106+
return images;
107+
env:
108+
BAKE_METADATA: ${{ steps.build-upload.outputs.metadata }}

.github/workflows/extract-image-names.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ repos:
1818
args: [--preserve-quotes]
1919

2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.9.2
21+
rev: v0.11.4
2222
hooks:
2323
- id: ruff-format
2424
- id: ruff
2525
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
2626

2727
- repo: https://github.com/python-jsonschema/check-jsonschema
28-
rev: "0.31.0"
28+
rev: "0.32.1"
2929
hooks:
3030
- id: check-dependabot
3131
- id: check-github-workflows

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"default": "3.9.13"
1111
},
1212
"AIIDA_VERSION": {
13-
"default": "2.6.3"
13+
"default": "2.7.1"
1414
},
1515
"AIIDALAB_VERSION": {
1616
"default": "24.09.0"

bumpver.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpver]
2-
current_version = "v2025.1026"
2+
current_version = "v2025.1027"
33
version_pattern = "vYYYY.BUILD[-TAG]"
44
commit_message = "Bump version {old_version} -> {new_version}."
55
commit = true

stack/base/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ USER root
1111
# rsync: needed to support the new AiiDA backup command
1212
# povray: rendering engine used in aiidalab-widgets-base
1313
# bc: needed to compute the resources for computer setup
14-
ENV EXTRA_APT_PACKAGES "curl povray rsync build-essential bc"
14+
ENV EXTRA_APT_PACKAGES="curl povray rsync build-essential bc"
1515

1616
# For ARM64 we need to install erlang as it is not available on conda-forge
1717
# (this is needed later as rabbitmq dependency in base-with-services image,
@@ -41,7 +41,7 @@ RUN echo "notebook==$(jupyter-notebook --version)" >> /opt/requirements.txt
4141
RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_packages {}
4242

4343
# Configure pip to use the same requirements file as constraints file.
44-
ENV PIP_CONSTRAINT /opt/requirements.txt
44+
ENV PIP_CONSTRAINT=/opt/requirements.txt
4545
# Ensure that pip installs packages to '~/.local/lib/python3.X/site-packages/' by default
4646
# by implicitly passing the '--user' option to 'pip install'
4747
# Otherwise, pip would install into /opt/conda and such packages would be lost
@@ -80,12 +80,12 @@ COPY config-quick-setup.yaml .
8080
COPY before-notebook.d/* /usr/local/bin/before-notebook.d/
8181

8282
# Configure AiiDA.
83-
ENV SETUP_DEFAULT_AIIDA_PROFILE true
84-
ENV AIIDA_PROFILE_NAME default
85-
ENV AIIDA_USER_EMAIL aiida@localhost
86-
ENV AIIDA_USER_FIRST_NAME Giuseppe
87-
ENV AIIDA_USER_LAST_NAME Verdi
88-
ENV AIIDA_USER_INSTITUTION Khedivial
83+
ENV SETUP_DEFAULT_AIIDA_PROFILE=true
84+
ENV AIIDA_PROFILE_NAME=default
85+
ENV AIIDA_USER_EMAIL=aiida@localhost
86+
ENV AIIDA_USER_FIRST_NAME=Giuseppe
87+
ENV AIIDA_USER_LAST_NAME=Verdi
88+
ENV AIIDA_USER_INSTITUTION=Khedivial
8989

9090
# Install the load-singlesshagent.sh script as described here:
9191
# https://aiida.readthedocs.io/projects/aiida-core/en/v2.0.0/howto/ssh.html#starting-the-ssh-agent

stack/base/config-quick-setup.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
db_engine: postgresql_psycopg2
32
db_backend: core.psql_dos
43
db_host: database
54
db_port: 5432

stack/full-stack/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM base-with-services as base
2+
FROM base-with-services AS base
33

44
FROM lab
55

stack/lab/Dockerfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ COPY --chown=${NB_UID}:${NB_GID} gears.svg ${CONDA_DIR}/share/jupyter/nbextensio
5151
COPY before-notebook.d/* /usr/local/bin/before-notebook.d/
5252

5353
# Configure AiiDAlab environment.
54-
ENV AIIDALAB_HOME /home/${NB_USER}
55-
ENV AIIDALAB_APPS ${AIIDALAB_HOME}/apps
56-
ENV AIIDALAB_DEFAULT_GIT_BRANCH master
54+
ENV AIIDALAB_HOME=/home/${NB_USER}
55+
ENV AIIDALAB_APPS=${AIIDALAB_HOME}/apps
56+
ENV AIIDALAB_DEFAULT_GIT_BRANCH=master
5757

5858
# Specify which apps to install in addition to the home app. The
5959
# AIIDALAB_DEFAULT_APPS variable should be a whitespace-delimited variable
@@ -66,10 +66,10 @@ ENV AIIDALAB_DEFAULT_GIT_BRANCH master
6666
# Please note that multiple entries must be whitespace delimited.
6767
# Please see `aiidalab install --help` for more information.
6868
# ENV AIIDALAB_DEFAULT_APPS "aiidalab-widgets-base~=1.0"
69-
ENV AIIDALAB_DEFAULT_APPS ""
69+
ENV AIIDALAB_DEFAULT_APPS=""
7070

7171
# Specify default factory reset (not set):
72-
ENV AIIDALAB_FACTORY_RESET ""
72+
ENV AIIDALAB_FACTORY_RESET=""
7373

7474
USER ${NB_USER}
7575

@@ -88,17 +88,17 @@ RUN mkdir -p /home/${NB_USER}/apps
8888
# Instead, here we configure Jupyter to kill all kernels that have been alive for
8989
# more than 12 hours. We also close all inactive terminals after 10 minutes.
9090
# NOTE2: show_banner=False disables the banner for upgrading to Notebook 7.
91-
ENV NOTEBOOK_ARGS \
92-
"--NotebookApp.default_url='/apps/apps/home/start.ipynb'" \
93-
"--NotebookApp.show_banner=False" \
94-
"--ContentsManager.allow_hidden=True" \
95-
"--MappingKernelManager.buffer_offline_messages=True" \
96-
"--MappingKernelManager.cull_busy=True" \
97-
"--MappingKernelManager.cull_connected=True" \
98-
"--MappingKernelManager.cull_idle_timeout=64800" \
99-
"--MappingKernelManager.cull_interval=300" \
100-
"--TerminalManager.cull_inactive_timeout=3600" \
101-
"--TerminalManager.cull_interval=300"
91+
ENV NOTEBOOK_ARGS=\
92+
"--NotebookApp.default_url=/apps/apps/home/start.ipynb "\
93+
"--NotebookApp.show_banner=False "\
94+
"--ContentsManager.allow_hidden=True "\
95+
"--MappingKernelManager.buffer_offline_messages=True "\
96+
"--MappingKernelManager.cull_busy=True "\
97+
"--MappingKernelManager.cull_connected=True "\
98+
"--MappingKernelManager.cull_idle_timeout=64800 "\
99+
"--MappingKernelManager.cull_interval=300 "\
100+
"--TerminalManager.cull_inactive_timeout=3600 "\
101+
"--TerminalManager.cull_interval=300"
102102

103103
# Set up the logo of notebook interface
104104
ARG PYTHON_MINOR_VERSION

0 commit comments

Comments
 (0)