提交 74152bc6 编写于 作者: D drewlee

Initial commit

上级
FROM jupyter/scipy-notebook:latest
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html
# Built from... https://hub.docker.com/r/jupyter/base-notebook/
# https://github.com/jupyter/docker-stacks/blob/HEAD/base-notebook/Dockerfile
# Built from... Ubuntu 20.04
# The jupyter/docker-stacks images contains jupyterhub and jupyterlab already.
# Example install of git and nbgitpuller.
# NOTE: git is already available in the jupyter/minimal-notebook image.
USER root
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
dnsutils \
iputils-ping \
&& rm -rf /var/lib/apt/lists/*
# Install language packs
RUN pip install --upgrade pip \
&& pip install jupyterlab-language-pack-zh-CN
# Install Java
# Install dependencies
RUN apt-get update \
&& apt-get install -y \
software-properties-common \
curl
# Install Zulu OpenJdk 11 (LTS)
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 \
&& apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main' \
&& apt install -y zulu-11
# Unpack and install the kernel
RUN curl -L https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip > ijava-kernel.zip
RUN unzip ijava-kernel.zip -d ijava-kernel \
&& cd ijava-kernel \
&& python3 install.py --sys-prefix
# Install jupyter RISE extension.
RUN pip install --upgrade pip \
&& pip install jupyter_contrib-nbextensions RISE \
&& jupyter-nbextension install rise --py --system \
&& jupyter-nbextension enable rise --py --system \
&& jupyter contrib nbextension install --system \
&& jupyter nbextension enable hide_input/main
# Cleanup
RUN rm ijava-kernel.zip \
&& rm -rf ijava-kernel/
# Install C
# Unpack and install the kernel
# RUN curl -L https://github.com/brendan-rius/jupyter-c-kernel/archive/refs/tags/1.2.2.zip > c-kernel.zip
# RUN unzip c-kernel.zip -d c-kernel \
# && cd c-kernel \
# && pip install --no-cache-dir c-kernel/ \
# && install_c_kernel --user
# # Cleanup
# RUN rm c-kernel.zip
RUN git clone https://github.com/brendan-rius/jupyter-c-kernel && cd jupyter-c-kernel
RUN apt-get update \
&& apt-get install -y build-essential \
&& apt-get install -y manpages-dev
RUN pip install --no-cache-dir jupyter-c-kernel/ \
&& install_c_kernel --user
# Cleanup
RUN rm -rf jupyter-c-kernel/
USER $NB_USER
COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install --no-cache-dir \
-r /tmp/requirements.txt
# Support overriding a package or two through passed docker --build-args.
# ARG PIP_OVERRIDES="jupyterhub==1.3.0"
ARG PIP_OVERRIDES=
RUN if [[ -n "$PIP_OVERRIDES" ]]; then \
pip install --no-cache-dir $PIP_OVERRIDES; \
fi
RUN jupyter serverextension enable --py nbgitpuller --sys-prefix
# Uncomment the line below to make nbgitpuller default to start up in JupyterLab
ENV NBGITPULLER_APP=lab
# conda/pip/apt install additional packages here, if desired.
# The default user image
This Docker image is the Helm chart's default user image. It contains the
fundamentals only so that it can get pulled quickly. It is based on the
[base-notebook image](https://github.com/jupyter/docker-stacks/blob/HEAD/base-notebook/Dockerfile)
from Project Jupyter's [jupyter/docker-stacks repository](https://github.com/jupyter/docker-stacks)
which also contains many other images suitable for use with the Helm chart. To
help you choose another one see [the docker-stacks documentation on selecting a
user image](http://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html).
For a brief introduction to _Dockerfiles_, _images_ and _containers_, see [the
guide's summary about container technology.](https://z2jh.jupyter.org/en/latest/tools.html#container-technology).
## Basic usage
To quickly try out this Docker image on your computer:
```sh
# with the classic UI
docker run -it --rm -p 8888:8888 codechina/k8s-singleuser-sample
# with JupyterLab
docker run -it --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=true codechina/k8s-singleuser-sample
```
This image available tags can be found [here](https://hub.docker.com/r/codechina/k8s-singleuser-sample/tags/).
## In the base-notebook image
- Ubuntu Linux - v18.04 aka. Bionic
- JupyterHub - required by with Helm chart since KubeSpawner requires it
- [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) and [JupyterLab-Hub extension](https://jupyterlab.readthedocs.io/en/stable/user/jupyterhub.html) - to activate it over the classical UI by default, see [the guide's instructions](https://z2jh.jupyter.org/en/latest/user-environment.html#use-jupyterlab-by-default).
\ No newline at end of file
jupyterhub==1.4.2
nbgitpuller==0.10.1
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册