Skip to content

Commit deab5a2

Browse files
committed
Merge branch 'massongit-fix_docker'
2 parents 92c1d77 + 3863fd4 commit deab5a2

File tree

2 files changed

+2
-116
lines changed

2 files changed

+2
-116
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Description
2222
Requirement
2323
====
2424
- Docker Desktop(Windows 10 proffesional Edition, macOS)
25+
- Apple M1チップ搭載のMacの場合は Docker Desktop 4.4.2 以降
2526
- Docker Toolbox(Windows 10 home edition)
2627

2728
※Windows 10 home でもWSL2をインストールすることでDocker Desktopが使えるようになりました!

dockerfiles/notebook/Dockerfile

Lines changed: 1 addition & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,4 @@
1-
#https://github.com/jupyter/docker-stacks/blob/1be67b97cc695c0a480ef80c26094c0699d963b9/datascience-notebook/Dockerfile を一部コメントアウト・改変
2-
ARG OWNER=jupyter
3-
ARG BASE_CONTAINER=$OWNER/scipy-notebook
4-
#FROM $BASE_CONTAINER
5-
FROM $BASE_CONTAINER:python-3.9.6
6-
7-
#LABEL maintainer="Jupyter Project <[email protected]>"
8-
9-
# Fix DL4006
10-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
11-
12-
USER root
13-
14-
# Julia installation
15-
# Default values can be overridden at build time
16-
# (ARGS are in lower case to distinguish them from ENV)
17-
# Check https://julialang.org/downloads/
18-
ARG julia_version="1.7.0"
19-
20-
# R pre-requisites
21-
RUN apt-get update --yes && \
22-
apt-get install --yes --no-install-recommends \
23-
fonts-dejavu \
24-
gfortran \
25-
gcc && \
26-
apt-get clean && rm -rf /var/lib/apt/lists/*
27-
28-
# Julia dependencies
29-
# install Julia packages in /opt/julia instead of ${HOME}
30-
ENV JULIA_DEPOT_PATH=/opt/julia \
31-
JULIA_PKGDIR=/opt/julia \
32-
JULIA_VERSION="${julia_version}"
33-
34-
WORKDIR /tmp
35-
36-
# hadolint ignore=SC2046
37-
RUN set -x && \
38-
julia_arch=$(uname -m) && \
39-
julia_short_arch="${julia_arch}" && \
40-
if [ "${julia_short_arch}" == "x86_64" ]; then \
41-
julia_short_arch="x64"; \
42-
fi; \
43-
julia_installer="julia-${JULIA_VERSION}-linux-${julia_arch}.tar.gz" && \
44-
julia_major_minor=$(echo "${JULIA_VERSION}" | cut -d. -f 1,2) && \
45-
mkdir "/opt/julia-${JULIA_VERSION}" && \
46-
wget -q "https://julialang-s3.julialang.org/bin/linux/${julia_short_arch}/${julia_major_minor}/${julia_installer}" && \
47-
tar xzf "${julia_installer}" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1 && \
48-
rm "${julia_installer}" && \
49-
ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia
50-
51-
# Show Julia where conda libraries are \
52-
RUN mkdir /etc/julia && \
53-
echo "push!(Libdl.DL_LOAD_PATH, \"${CONDA_DIR}/lib\")" >> /etc/julia/juliarc.jl && \
54-
# Create JULIA_PKGDIR \
55-
mkdir "${JULIA_PKGDIR}" && \
56-
chown "${NB_USER}" "${JULIA_PKGDIR}" && \
57-
fix-permissions "${JULIA_PKGDIR}"
58-
59-
USER ${NB_UID}
60-
61-
# R packages including IRKernel which gets installed globally.
62-
# r-e1071: dependency of the caret R package
63-
RUN mamba install --quiet --yes \
64-
'r-base' \
65-
'r-caret' \
66-
'r-crayon' \
67-
'r-devtools' \
68-
'r-e1071' \
69-
'r-forecast' \
70-
'r-hexbin' \
71-
'r-htmltools' \
72-
'r-htmlwidgets' \
73-
'r-irkernel' \
74-
'r-nycflights13' \
75-
'r-randomforest' \
76-
'r-rcurl' \
77-
'r-rodbc' \
78-
'r-rsqlite' \
79-
'r-shiny' \
80-
'rpy2' \
81-
'unixodbc' && \
82-
mamba clean --all -f -y && \
83-
fix-permissions "${CONDA_DIR}" && \
84-
fix-permissions "/home/${NB_USER}"
85-
86-
# These packages are not easy to install under arm
87-
RUN set -x && \
88-
arch=$(uname -m) && \
89-
if [ "${arch}" == "x86_64" ]; then \
90-
mamba install --quiet --yes \
91-
'r-rmarkdown' \
92-
'r-tidymodels' \
93-
'r-tidyverse' && \
94-
mamba clean --all -f -y && \
95-
fix-permissions "${CONDA_DIR}" && \
96-
fix-permissions "/home/${NB_USER}"; \
97-
fi;
98-
99-
# Add Julia packages.
100-
# Install IJulia as jovyan and then move the kernelspec out
101-
# to the system share location. Avoids problems with runtime UID change not
102-
# taking effect properly on the .local folder in the jovyan home dir.
103-
#RUN julia -e 'import Pkg; Pkg.update()' && \
104-
# julia -e 'import Pkg; Pkg.add("HDF5")' && \
105-
# julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \
106-
# # move kernelspec out of home \
107-
# mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \
108-
# chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \
109-
# rm -rf "${HOME}/.local" && \
110-
# fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter"
111-
112-
WORKDIR "${HOME}"
113-
114-
# ここから100本ノックオリジナル実装
115-
#TODO: jupyter/datascience-notebookがARM64対応したら以下をベースにする
116-
#FROM jupyter/datascience-notebook:python-3.9.6
1+
FROM jupyter/datascience-notebook:python-3.9.6
1172
#FROM jupyter/datascience-notebook:d53a302fbcd0
1183
USER root
1194
ENV DEBCONF_NOWARNINGS yes

0 commit comments

Comments
 (0)