-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install RabbitMQ from conda on arm64
- Loading branch information
1 parent
e6fab3c
commit 90fa979
Showing
6 changed files
with
10 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -6,44 +6,20 @@ LABEL maintainer="AiiDAlab Team <[email protected]>" | |
USER root | ||
WORKDIR /opt/ | ||
|
||
ARG AIIDA_VERSION | ||
ARG PGSQL_VERSION | ||
ARG RMQ_VERSION | ||
ARG TARGETARCH | ||
|
||
# Location of the Postgresql DB | ||
# This variable is automatically picked up by initdb and pg_ctl | ||
# WARNING: If you change this, you have to change it in full-stack as well! | ||
ENV PGDATA=/home/${NB_USER}/.postgresql | ||
|
||
# Install RabbitMQ and PostgreSQL in a dedicated conda environment. | ||
# | ||
# RabbitMQ is currently not available on conda-forge for arm64, see: | ||
# https://github.com/conda-forge/rabbitmq-server-feedstock/issues/67If | ||
# Instead we need install erlang via apt and RabbitMQ as a "Generic Unix Build", see: | ||
# https://www.rabbitmq.com/install-generic-unix.html | ||
# Note that this version must be compatible with system's erlang version. | ||
# Currently installed Erlang version is 23.3, so the latest supported RMQ version is 3.9.21 | ||
# https://www.rabbitmq.com/docs/which-erlang#old-timers | ||
# Note that system erlang from arm64 is already installed in the base image, | ||
# together with other APT dependencies to save build time. | ||
RUN if [ "$TARGETARCH" = "amd64" ]; then \ | ||
mamba create -p /opt/conda/envs/aiida-core-services --yes \ | ||
postgresql=${PGSQL_VERSION} \ | ||
rabbitmq-server=${RMQ_VERSION} && \ | ||
mamba clean --all -f -y && \ | ||
fix-permissions "${CONDA_DIR}"; \ | ||
elif [ "$TARGETARCH" = "arm64" ]; then \ | ||
mamba create -p /opt/conda/envs/aiida-core-services --yes \ | ||
postgresql=${PGSQL_VERSION} && \ | ||
mamba clean --all -f -y && \ | ||
wget -c https://github.com/rabbitmq/rabbitmq-server/releases/download/v${RMQ_VERSION}/rabbitmq-server-generic-unix-${RMQ_VERSION}.tar.xz && \ | ||
tar -xf rabbitmq-server-generic-unix-${RMQ_VERSION}.tar.xz && \ | ||
rm rabbitmq-server-generic-unix-${RMQ_VERSION}.tar.xz && \ | ||
mv rabbitmq_server-${RMQ_VERSION} /opt/conda/envs/aiida-core-services/rabbitmq_server && \ | ||
ln -sf /opt/conda/envs/aiida-core-services/rabbitmq_server/sbin/* /opt/conda/envs/aiida-core-services/bin/ && \ | ||
fix-permissions "${CONDA_DIR}"; \ | ||
fi | ||
RUN mamba create -p /opt/conda/envs/aiida-core-services --yes \ | ||
postgresql=${PGSQL_VERSION} \ | ||
rabbitmq-server=${RMQ_VERSION} && \ | ||
mamba clean --all -f -y && \ | ||
fix-permissions "${CONDA_DIR}" | ||
|
||
# Configure AiiDA profile. | ||
COPY config-quick-setup.yaml . | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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