Skip to content

Commit 061a02b

Browse files
authored
Merge pull request #1503 from ggaaooppeenngg/Add-Conda-Mirror
Add conda mirror option in base notebook
2 parents 822290e + a4cfde8 commit 061a02b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

base-notebook/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ RUN mkdir "/home/${NB_USER}/work" && \
7878
# Install conda as jovyan and check the sha256 sum provided on the download site
7979
WORKDIR /tmp
8080

81+
# CONDA_MIRROR is a mirror prefix to speed up downloading
82+
# For example, people from mainland China could set it as
83+
# https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease
84+
ARG CONDA_MIRROR=https://github.com/conda-forge/miniforge/releases/latest/download
85+
8186
# ---- Miniforge installer ----
8287
# Check https://github.com/conda-forge/miniforge/releases
8388
# Package Manager and Python implementation to use (https://github.com/conda-forge/miniforge)
@@ -89,7 +94,7 @@ RUN set -x && \
8994
# Miniforge installer
9095
miniforge_arch=$(uname -m) && \
9196
miniforge_installer="Mambaforge-Linux-${miniforge_arch}.sh" && \
92-
wget --quiet "https://github.com/conda-forge/miniforge/releases/latest/download/${miniforge_installer}" && \
97+
wget --quiet "${CONDA_MIRROR}/${miniforge_installer}" && \
9398
/bin/bash "${miniforge_installer}" -f -b -p "${CONDA_DIR}" && \
9499
rm "${miniforge_installer}" && \
95100
# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html

0 commit comments

Comments
 (0)