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

Install micromamba to /opt/conda/condabin #288

Merged
merged 6 commits into from
Oct 17, 2024
Merged
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
11 changes: 9 additions & 2 deletions .circleci/test_docker_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,22 @@ locale -a | grep -i 'en_US.UTF.\?8'
# check that /opt/conda has correct permissions
touch /opt/conda/bin/test_conda_forge

# check that conda is activated
# check that conda and micromamba are activated
conda info
micromamba info --root-prefix /opt/conda

# show all packages installed in base
conda list

# check that we can install a conda package
# check that we can install a conda package with conda
conda install --yes --quiet conda-forge-pinning -c conda-forge

# check that we can install a conda package with micromamba
MAMBA_PKGS_DIRS=/opt/conda/pkgs micromamba install \
--root-prefix ~/.conda --prefix=/opt/conda \
--yes --quiet --override-channels -c conda-forge \
conda-forge-ci-setup

set +e
/usr/bin/sudo -n yum install mesa-libGL mesa-dri-drivers libselinux libXdamage libXxf86vm libXext

Expand Down
17 changes: 16 additions & 1 deletion scripts/run_commands
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,26 @@ export additional_channel=""

export miniforge_arch="$(uname -m)"
export miniforge_version="24.7.1-2"
export micromamba_version="1.5.10-0"
export python_version="3.12" # should match the one provided in miniforge
export condapkg="https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/Miniforge3-${miniforge_version}-Linux-${miniforge_arch}.sh"
echo "$python_version" > /opt/python_version
if [ "$(uname -m)" = "x86_64" ]; then
export conda_chksum="636f7faca2d51ee42b4640ce160c751a46d57621ef4bf14378704c87c5db4fe3"
export micromamba_arch="64"
export micromamba_chksum="80057e007579d482a39dc283dd3e725503e34da7e7c51844957164511cdb917b"
elif [ "$(uname -m)" = "ppc64le" ]; then
export conda_chksum="bb5d14dac73b85da8fbe386cdd3c94022a468563a0c55e6b20a58d82b55a9737"
export micromamba_arch="ppc64le"
export micromamba_chksum="5528e92b12f7389a8d23a409a476e871f4f889a17e381924cf74459f14627ddd"
elif [ "$(uname -m)" = "aarch64" ]; then
export conda_chksum="7bf60bce50f57af7ea4500b45eeb401d9350011ab34c9c45f736647d8dba9021"
export micromamba_arch="aarch64"
export micromamba_chksum="7803a2aa51a5f0a58f3d2ef0f07724edb67f31f61b3e44ae9b8d6c9f009f7996"
else
exit 1
fi
export condapkg="https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/Miniforge3-${miniforge_version}-Linux-${miniforge_arch}.sh"
export micromambapkg="https://github.com/mamba-org/micromamba-releases/releases/download/${micromamba_version}/micromamba-linux-${micromamba_arch}"

# give sudo permission for conda user to run yum (user creation is postponed
# to the entrypoint, so we can create a user with the same id as the host)
Expand All @@ -33,6 +42,12 @@ sha256sum miniconda.sh | grep $conda_chksum
bash miniconda.sh -b -p /opt/conda
rm -f miniconda.sh

# Download micromamba and put it condabin
curl -s -L $micromambapkg > /opt/conda/condabin/micromamba
sha256sum /opt/conda/condabin/micromamba | grep $micromamba_chksum
chmod +x /opt/conda/condabin/micromamba
ln -s /opt/conda/condabin/micromamba /opt/conda/bin/micromamba

# Work around TLS issues while updating conda's python and retrieving channel notices
export CONDA_NUMBER_CHANNEL_NOTICES="0"
touch /opt/conda/conda-meta/pinned
Expand Down