Jupyter notebook docker image for arm64
M1 Mac で Jupyter notebook を動かす
当然 Docker でやる
しかし docker run jupyter/datascience-notebook すると amd64 の docker image が降ってくる
arm をやる気はないらしい
All published containers support amd64 (x86_64) and aarch64, except for datascience-notebook and tensorflow-notebook, which only support amd64 for now.
なぜこいつらだけ仲間はずれなのか
動くっちゃ動くがCPUパフォーマンスがガタ落ちするとのこと
実際Rのライブラリをインストールするだけのステップが全然終わらない
じゃあ自分でビルドすればいいんじゃないですか?
code:terminal
// Edit each dockerfile to modify the name of image owner to jupyter-arm64
$ git diff
diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile
index e9d852c..dfeb2bb 100644
--- a/datascience-notebook/Dockerfile
+++ b/datascience-notebook/Dockerfile
@@ -1,6 +1,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
-ARG OWNER=jupyter
+ARG OWNER=jupyter-arm64
ARG BASE_CONTAINER=$OWNER/scipy-notebook
FROM $BASE_CONTAINER
diff --git a/minimal-notebook/Dockerfile b/minimal-notebook/Dockerfile
index 4b1a493..b87816c 100644
--- a/minimal-notebook/Dockerfile
+++ b/minimal-notebook/Dockerfile
@@ -1,6 +1,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
-ARG OWNER=jupyter
+ARG OWNER=jupyter-arm64
ARG BASE_CONTAINER=$OWNER/base-notebook
FROM $BASE_CONTAINER
diff --git a/scipy-notebook/Dockerfile b/scipy-notebook/Dockerfile
index 8e36c70..2625d9a 100644
--- a/scipy-notebook/Dockerfile
+++ b/scipy-notebook/Dockerfile
@@ -1,6 +1,6 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
-ARG OWNER=jupyter
+ARG OWNER=jupyter-arm64
ARG BASE_CONTAINER=$OWNER/minimal-notebook
FROM $BASE_CONTAINER
$ cat build-arm64.sh
BASEDIR=$(cd $(dirname ${0}) && pwd -P)
OWNER="jupyter-arm64"
cd ${BASEDIR}/base-notebook
docker build -t ${OWNER}/base-notebook .
cd ${BASEDIR}/minimal-notebook
docker build -t ${OWNER}/minimal-notebook .
cd ${BASEDIR}/scipy-notebook
docker build -t ${OWNER}/scipy-notebook .
cd ${BASEDIR}/datascience-notebook
docker build -t ${OWNER}/datascience-notebook .
ビルドは成功
しかし一部やはり arm64 ではインストールできない部分がある模様
tidyverse とか r-markdown とか
今回はひとまず amd64 を使うことに