-
Notifications
You must be signed in to change notification settings - Fork 14
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
Install RabbitMQ from conda on arm64 #482
Draft
danielhollas
wants to merge
3
commits into
awb
Choose a base branch
from
rmq-arm64-from-conda
base: awb
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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}" | ||
Comment on lines
+18
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool! |
||
|
||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,6 @@ set -x | |
# Environment. | ||
export SHELL=/bin/bash | ||
|
||
# Fix https://github.com/aiidalab/aiidalab-docker-stack/issues/225 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This issue has been fixed a long time ago and should not be relevant in the new docker stack. |
||
if [ -L /home/${NB_USER}/${NB_USER} ]; then | ||
rm /home/${NB_USER}/${NB_USER} | ||
fi | ||
|
||
# Check whether this is likely the first time we run this script. | ||
[[ -z $(ls -A "/home/${NB_USER}/apps/") ]] && INITIAL_SETUP=1 || INITIAL_SETUP=0 | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @danielhollas, you mentioned once you want to bring this up to aiida team, I was on holiday that week. @superstar54 told me you were there at the meeting and mentioned this. Is there going to be some tests add for the different version of RMQ?