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

Make the base & minimal notebook containers not amd specific (e.g. support building for arm64) #1368

Merged
merged 16 commits into from
Jul 8, 2021
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ This change is tracked in the issue [#1217](https://github.com/jupyter/docker-st
- [Jupyter Discourse Forum](https://discourse.jupyter.org/)
- [Jupyter Website](https://jupyter.org)
- [Images on DockerHub](https://hub.docker.com/u/jupyter)

## Architectures

Currently published containers only support x86, some containers may support cross-building with docker buildx.
26 changes: 13 additions & 13 deletions base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

# Ubuntu 20.04 (focal)
# https://hub.docker.com/_/ubuntu/?tab=tags&name=focal
holdenk marked this conversation as resolved.
Show resolved Hide resolved
# OS/ARCH: linux/amd64
ARG ROOT_CONTAINER=ubuntu:focal-20210609@sha256:376209074d481dca0a9cf4282710cd30a9e7ff402dea8261acdaaf57a18971dd
ARG ROOT_CONTAINER=ubuntu:focal-20210609

ARG BASE_CONTAINER=$ROOT_CONTAINER
FROM $BASE_CONTAINER
FROM $ROOT_CONTAINER

LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
ARG NB_USER="jovyan"
Expand All @@ -27,19 +25,13 @@ USER root
ARG conda_version="4.10.2"
# Miniforge installer patch version
ARG miniforge_patch_number="0"
# Miniforge installer architecture
ARG miniforge_arch="x86_64"
# 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}"
# Miniforge installer
ARG miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh"
# Miniforge checksum
ARG miniforge_checksum="1e89ee86afa06e23b2478579be16a33fff6cff346314f6a6382fd20b1f83e669"


# 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 @@ -104,8 +96,16 @@ RUN mkdir "/home/${NB_USER}/work" && \
WORKDIR /tmp

# Prerequisites installation: conda, mamba, pip, tini
RUN wget --quiet "https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/${miniforge_installer}" && \
echo "${miniforge_checksum} *${miniforge_installer}" | sha256sum --check && \
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
RUN set -x && \
# Miniforge installer
miniforge_arch=$(uname -m) && \
export miniforge_arch && \
if [ "$miniforge_arch" == "aarm64" ]; then \
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}" && \
mathbunnyru marked this conversation as resolved.
Show resolved Hide resolved
rm "${miniforge_installer}" && \
# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html
Expand Down
5 changes: 5 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ Docker destroys the container after notebook server exit, but any files written

docker run --rm -p 10000:8888 -e JUPYTER_ENABLE_LAB=yes -v "${PWD}":/home/jovyan/work jupyter/datascience-notebook:33add21fab64

Architectures
-----------
Currently published containers only support x86, some containers may support cross-building with docker buildx.


Table of Contents
-----------------

Expand Down