Sign inSign up

mayi21docker/notebook

By mayi21docker

•Updated over 4 years ago

A perfect notebook docker image|Out of box

Image
0

351

mayi21docker/notebook repository overview

⁠Jupyter Notebook

A perfect notebook docker image.

⁠Usage

⁠Docker CLI
docker run -d \
-v /notebook:/notebook \
-p 8888:8888 \
mayi21docker/notebook:latest

Default password: 1234

⁠Docker File
FROM ubuntu:latest
RUN mkdir /notebook
RUN apt -y update && apt -y upgrade && apt -y install python3 python3-pip vim
RUN pip3 install jupyter jupyter_contrib_nbextensions jupyter_nbextensions_configurator
RUN jupyter notebook --generate-config
RUN jupyter contrib nbextension install --user
RUN echo "c.NotebookApp.ip = '*'" >> /root/.jupyter/jupyter_notebook_config.py && echo 'c.NotebookApp.open_browser = False' >> /root/.jupyter/jupyter_notebook_config.py
RUN echo 'c.NotebookApp.port = 8888' >> /root/.jupyter/jupyter_notebook_config.py && echo "c.ContentsManager.root_dir = '/notebook'" >> /root/.jupyter/jupyter_notebook_config.py
RUN echo 'c.NotebookApp.allow_root = True' >> /root/.jupyter/jupyter_notebook_config.py
RUN echo "c.NotebookApp.password = 'argon2:\$argon2id\$v=19\$m=10240,t=10,p=8\$V4ObFBdgylD9u+D0rs9+uw\$qZ2rcJG7l9/Qh4wi0jjwxN1hXW7brLoinQR7gUnhEQg'" >> /root/.jupyter/jupyter_notebook_config.py
CMD jupyter-notebook

config password through

In[1] from notebook.auth import passwd
In[2] passwd()
Enter password:
Verify password:
Out[2] 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

then paste hashed value in c.NotebookApp.password

Tag summary

Content type

Image

Digest

Size

289.5 MB

Last updated

over 4 years ago

docker pull mayi21docker/notebook