|
6 | 6 | USER root |
7 | 7 | WORKDIR /opt/ |
8 | 8 |
|
9 | | -ARG AIIDA_VERSION |
10 | 9 | ARG PGSQL_VERSION |
11 | 10 | ARG RMQ_VERSION |
12 | | -ARG TARGETARCH |
13 | 11 |
|
14 | 12 | # Location of the Postgresql DB |
15 | 13 | # This variable is automatically picked up by initdb and pg_ctl |
16 | 14 | # WARNING: If you change this, you have to change it in full-stack as well! |
17 | 15 | ENV PGDATA=/home/${NB_USER}/.postgresql |
18 | 16 |
|
19 | 17 | # Install RabbitMQ and PostgreSQL in a dedicated conda environment. |
20 | | -# |
21 | | -# RabbitMQ is currently not available on conda-forge for arm64, see: |
22 | | -# https://github.com/conda-forge/rabbitmq-server-feedstock/issues/67If |
23 | | -# Instead we need install erlang via apt and RabbitMQ as a "Generic Unix Build", see: |
24 | | -# https://www.rabbitmq.com/install-generic-unix.html |
25 | | -# Note that this version must be compatible with system's erlang version. |
26 | | -# Currently installed Erlang version is 23.3, so the latest supported RMQ version is 3.9.21 |
27 | | -# https://www.rabbitmq.com/docs/which-erlang#old-timers |
28 | | -# Note that system erlang from arm64 is already installed in the base image, |
29 | | -# together with other APT dependencies to save build time. |
30 | | -RUN if [ "$TARGETARCH" = "amd64" ]; then \ |
31 | | - mamba create -p /opt/conda/envs/aiida-core-services --yes \ |
32 | | - postgresql=${PGSQL_VERSION} \ |
33 | | - rabbitmq-server=${RMQ_VERSION} && \ |
34 | | - mamba clean --all -f -y && \ |
35 | | - fix-permissions "${CONDA_DIR}"; \ |
36 | | - elif [ "$TARGETARCH" = "arm64" ]; then \ |
37 | | - mamba create -p /opt/conda/envs/aiida-core-services --yes \ |
38 | | - postgresql=${PGSQL_VERSION} && \ |
39 | | - mamba clean --all -f -y && \ |
40 | | - wget -c https://github.com/rabbitmq/rabbitmq-server/releases/download/v${RMQ_VERSION}/rabbitmq-server-generic-unix-${RMQ_VERSION}.tar.xz && \ |
41 | | - tar -xf rabbitmq-server-generic-unix-${RMQ_VERSION}.tar.xz && \ |
42 | | - rm rabbitmq-server-generic-unix-${RMQ_VERSION}.tar.xz && \ |
43 | | - mv rabbitmq_server-${RMQ_VERSION} /opt/conda/envs/aiida-core-services/rabbitmq_server && \ |
44 | | - ln -sf /opt/conda/envs/aiida-core-services/rabbitmq_server/sbin/* /opt/conda/envs/aiida-core-services/bin/ && \ |
45 | | - fix-permissions "${CONDA_DIR}"; \ |
46 | | - fi |
| 18 | +RUN mamba create -p /opt/conda/envs/aiida-core-services --yes \ |
| 19 | + postgresql=${PGSQL_VERSION} \ |
| 20 | + rabbitmq-server=${RMQ_VERSION} && \ |
| 21 | + mamba clean --all -f -y && \ |
| 22 | + fix-permissions "${CONDA_DIR}" |
47 | 23 |
|
48 | 24 | # Configure AiiDA profile. |
49 | 25 | COPY config-quick-setup.yaml . |
|
0 commit comments