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

test: mamba and micromamba release candidates #2243

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
9 changes: 6 additions & 3 deletions images/docker-stacks-foundation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ USER ${NB_UID}
# Pin the Python version here, or set it to "default"
ARG PYTHON_VERSION=3.12

ARG MAMBA_VERSION=2.0.7.rc1

# Setup work directory for backward-compatibility
RUN mkdir "/home/${NB_USER}/work" && \
fix-permissions "/home/${NB_USER}"
Expand All @@ -115,22 +117,23 @@ RUN set -x && \
fi && \
# https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#linux-and-macos
wget --progress=dot:giga -O - \
"https://micro.mamba.pm/api/micromamba/linux-${arch}/latest" | tar -xvj bin/micromamba && \
"https://micro.mamba.pm/api/micromamba/linux-${arch}/${MAMBA_VERSION}" | tar -xvj bin/micromamba && \
PYTHON_SPECIFIER="python=${PYTHON_VERSION}" && \
if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; fi && \
# Install the packages
./bin/micromamba install \
./bin/micromamba install -c conda-forge/label/mamba_prerelease -c conda-forge \
--root-prefix="${CONDA_DIR}" \
--prefix="${CONDA_DIR}" \
--yes \
'jupyter_core' \
'conda' \
'mamba' \
"mamba==${MAMBA_VERSION}" \
"${PYTHON_SPECIFIER}" && \
rm -rf /tmp/bin/ && \
# Pin major.minor version of python
# https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning
mamba list --full-name 'python' | awk 'END{sub("[^.]*$", "*", $2); print $1 " " $2}' >> "${CONDA_DIR}/conda-meta/pinned" && \
echo "mamba=${MAMBA_VERSION}" >> "${CONDA_DIR}/conda-meta/pinned" && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down