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

Switch from Miniconda to Miniforge #1189

Merged
merged 9 commits into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from 3 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
38 changes: 18 additions & 20 deletions base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

USER root

# Miniconda installation
# Miniforge installation
# Default values can be overridden at build time
# (ARGS are in lower case to distinguish them from ENV)
# Check https://repo.anaconda.com/miniconda/
# Miniconda archive to install
ARG miniconda_version="4.8.3"
# Archive MD5 checksum
ARG miniconda_checksum="d63adf39f2c220950a063e0529d4ff74"
# Conda version that can be different from the archive
# Check https://github.com/conda-forge/miniforge/releases
# Conda version
ARG conda_version="4.9.0"
# Miniforge archive to install
ARG miniforge_version="${conda_version}-3"
# Miniforge installer
ARG miniforge_installer="Miniforge3-${miniforge_version}-Linux-x86_64.sh"

# Install all OS dependencies for notebook server that starts but lacks all
# features (e.g., download as all possible file formats)
Expand Down Expand Up @@ -57,7 +57,8 @@ ENV CONDA_DIR=/opt/conda \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
ENV PATH=$CONDA_DIR/bin:$PATH \
HOME=/home/$NB_USER
HOME=/home/$NB_USER \
CONDA_VERSION="${conda_version}"

# Copy a script that we will use to correct permissions after running certain commands
COPY fix-permissions /usr/local/bin/fix-permissions
Expand All @@ -82,25 +83,22 @@ RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
fix-permissions $CONDA_DIR

USER $NB_UID
WORKDIR $HOME
ARG PYTHON_VERSION=default

# Setup work directory for backward-compatibility
RUN mkdir /home/$NB_USER/work && \
fix-permissions /home/$NB_USER

# Install conda as jovyan and check the md5 sum provided on the download site
ENV MINICONDA_VERSION="${miniconda_version}" \
CONDA_VERSION="${conda_version}"
RUN mkdir "/home/$NB_USER/work" && \
fix-permissions "/home/$NB_USER"

# Install conda as jovyan and check the sha256 sum provided on the download site
WORKDIR /tmp
RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda3-py38_${MINICONDA_VERSION}-Linux-x86_64.sh && \
echo "${miniconda_checksum} *Miniconda3-py38_${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - && \
/bin/bash Miniconda3-py38_${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
rm Miniconda3-py38_${MINICONDA_VERSION}-Linux-x86_64.sh && \

RUN wget --quiet "https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/${miniforge_installer}" && \
wget --quiet "https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/${miniforge_installer}.sha256" && \
sha256sum -c "${miniforge_installer}.sha256" && \
romainx marked this conversation as resolved.
Show resolved Hide resolved
/bin/bash "${miniforge_installer}" -f -b -p $CONDA_DIR && \
rm "${miniforge_installer}" "${miniforge_installer}.sha256" && \
# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html
echo "conda ${CONDA_VERSION}" >> $CONDA_DIR/conda-meta/pinned && \
conda config --system --prepend channels conda-forge && \
conda config --system --set auto_update_conda false && \
conda config --system --set show_channel_urls true && \
conda config --system --set channel_priority strict && \
Expand Down
2 changes: 1 addition & 1 deletion docs/using/selecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ and versioning strategy.
[options common across all core stacks](common.md). It is the basis for all other stacks.

- Minimally-functional Jupyter Notebook server (e.g., no LaTeX support for saving notebooks as PDFs)
- [Miniconda](https://conda.io/miniconda.html) Python 3.x in `/opt/conda`
- [Miniforge](https://github.com/conda-forge/miniforge) Python 3.x in `/opt/conda`
- No preinstalled scientific computing packages
- Unprivileged user `jovyan` (`uid=1000`, configurable, see options) in group `users` (`gid=100`)
with ownership over the `/home/jovyan` and `/opt/conda` paths
Expand Down
1 change: 1 addition & 0 deletions test/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"protobuf",
"r-irkernel",
"unixodbc",
"bzip2"
]


Expand Down