mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-19 07:52:56 +00:00
Merge pull request #1438 from mathbunnyru/asalikhov/use_latest_mambaforge
Use latest mambaforge release
This commit is contained in:
@@ -17,24 +17,9 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# ---- Miniforge installer ----
|
|
||||||
# Default values can be overridden at build time
|
|
||||||
# (ARGS are in lower case to distinguish them from ENV)
|
|
||||||
# Check https://github.com/conda-forge/miniforge/releases
|
|
||||||
# Conda version
|
|
||||||
ARG conda_version="4.10.3"
|
|
||||||
# Miniforge installer patch version
|
|
||||||
ARG miniforge_patch_number="3"
|
|
||||||
# Package Manager and Python implementation to use (https://github.com/conda-forge/miniforge)
|
|
||||||
# - conda only: either Miniforge3 to use Python or Miniforge-pypy3 to use PyPy
|
|
||||||
# - conda + mamba: either Mambaforge to use Python or Mambaforge-pypy3 to use PyPy
|
|
||||||
ARG miniforge_python="Mambaforge"
|
|
||||||
# Miniforge archive to install
|
|
||||||
ARG miniforge_version="${conda_version}-${miniforge_patch_number}"
|
|
||||||
|
|
||||||
|
|
||||||
# Install all OS dependencies for notebook server that starts but lacks all
|
# Install all OS dependencies for notebook server that starts but lacks all
|
||||||
# features (e.g., download as all possible file formats)
|
# features (e.g., download as all possible file formats)
|
||||||
|
# Install tini: init for containers
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
RUN apt-get update --yes && \
|
RUN apt-get update --yes && \
|
||||||
apt-get install --yes --no-install-recommends \
|
apt-get install --yes --no-install-recommends \
|
||||||
@@ -59,9 +44,7 @@ ENV CONDA_DIR=/opt/conda \
|
|||||||
LANG=en_US.UTF-8 \
|
LANG=en_US.UTF-8 \
|
||||||
LANGUAGE=en_US.UTF-8
|
LANGUAGE=en_US.UTF-8
|
||||||
ENV PATH="${CONDA_DIR}/bin:${PATH}" \
|
ENV PATH="${CONDA_DIR}/bin:${PATH}" \
|
||||||
HOME="/home/${NB_USER}" \
|
HOME="/home/${NB_USER}"
|
||||||
CONDA_VERSION="${conda_version}" \
|
|
||||||
MINIFORGE_VERSION="${miniforge_version}"
|
|
||||||
|
|
||||||
# Copy a script that we will use to correct permissions after running certain commands
|
# Copy a script that we will use to correct permissions after running certain commands
|
||||||
COPY fix-permissions /usr/local/bin/fix-permissions
|
COPY fix-permissions /usr/local/bin/fix-permissions
|
||||||
@@ -95,28 +78,25 @@ RUN mkdir "/home/${NB_USER}/work" && \
|
|||||||
# Install conda as jovyan and check the sha256 sum provided on the download site
|
# Install conda as jovyan and check the sha256 sum provided on the download site
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
# Prerequisites installation: conda, mamba, pip, tini
|
# ---- Miniforge installer ----
|
||||||
|
# Check https://github.com/conda-forge/miniforge/releases
|
||||||
|
# Package Manager and Python implementation to use (https://github.com/conda-forge/miniforge)
|
||||||
|
# We're using Mambaforge installer, possible options:
|
||||||
|
# - conda only: either Miniforge3 to use Python or Miniforge-pypy3 to use PyPy
|
||||||
|
# - conda + mamba: either Mambaforge to use Python or Mambaforge-pypy3 to use PyPy
|
||||||
|
# Installation: conda, mamba, pip
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
# Miniforge installer
|
# Miniforge installer
|
||||||
miniforge_arch=$(uname -m) && \
|
miniforge_arch=$(uname -m) && \
|
||||||
export miniforge_arch && \
|
miniforge_installer="Mambaforge-Linux-${miniforge_arch}.sh" && \
|
||||||
if [ "$miniforge_arch" == "aarm64" ]; then \
|
wget --quiet "https://github.com/conda-forge/miniforge/releases/latest/download/${miniforge_installer}" && \
|
||||||
miniforge_arch="arm64"; \
|
|
||||||
fi; \
|
|
||||||
miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh" && \
|
|
||||||
export miniforge_installer && \
|
|
||||||
wget --quiet "https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/${miniforge_installer}" && \
|
|
||||||
/bin/bash "${miniforge_installer}" -f -b -p "${CONDA_DIR}" && \
|
/bin/bash "${miniforge_installer}" -f -b -p "${CONDA_DIR}" && \
|
||||||
rm "${miniforge_installer}" && \
|
rm "${miniforge_installer}" && \
|
||||||
# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html
|
# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html
|
||||||
echo "conda ${CONDA_VERSION}" >> "${CONDA_DIR}/conda-meta/pinned" && \
|
|
||||||
conda config --system --set auto_update_conda false && \
|
conda config --system --set auto_update_conda false && \
|
||||||
conda config --system --set show_channel_urls true && \
|
conda config --system --set show_channel_urls true && \
|
||||||
if [[ "${PYTHON_VERSION}" != "default" ]]; then conda install --yes python="${PYTHON_VERSION}"; fi && \
|
if [[ "${PYTHON_VERSION}" != "default" ]]; then conda install --yes python="${PYTHON_VERSION}"; fi && \
|
||||||
conda list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 >> "${CONDA_DIR}/conda-meta/pinned" && \
|
conda list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 >> "${CONDA_DIR}/conda-meta/pinned" && \
|
||||||
conda install --quiet --yes \
|
|
||||||
"conda=${CONDA_VERSION}" \
|
|
||||||
'pip' && \
|
|
||||||
conda update --all --quiet --yes && \
|
conda update --all --quiet --yes && \
|
||||||
conda clean --all -f -y && \
|
conda clean --all -f -y && \
|
||||||
rm -rf "/home/${NB_USER}/.cache/yarn" && \
|
rm -rf "/home/${NB_USER}/.cache/yarn" && \
|
||||||
|
Reference in New Issue
Block a user