• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN python3 -m pip install --no-cache-dir jupyter matplotlib
2# Pin ipykernel and nbformat; see https://github.com/ipython/ipykernel/issues/422
3# Pin jedi; see https://github.com/ipython/ipython/issues/12740
4RUN python3 -m pip install --no-cache-dir jupyter_http_over_ws ipykernel==5.1.1 nbformat==4.4.0 jedi==0.17.2
5RUN jupyter serverextension enable --py jupyter_http_over_ws
6
7RUN mkdir -p /tf/tensorflow-tutorials && chmod -R a+rwx /tf/
8RUN mkdir /.local && chmod a+rwx /.local
9RUN apt-get update && apt-get install -y --no-install-recommends wget git
10WORKDIR /tf/tensorflow-tutorials
11RUN wget https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/keras/classification.ipynb
12RUN wget https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/keras/overfit_and_underfit.ipynb
13RUN wget https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/keras/regression.ipynb
14RUN wget https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/keras/save_and_load.ipynb
15RUN wget https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/keras/text_classification.ipynb
16RUN wget https://raw.githubusercontent.com/tensorflow/docs/master/site/en/tutorials/keras/text_classification_with_hub.ipynb
17COPY readme-for-jupyter.md README.md
18RUN apt-get autoremove -y && apt-get remove -y wget
19WORKDIR /tf
20EXPOSE 8888
21
22RUN python3 -m ipykernel.kernelspec
23
24CMD ["bash", "-c", "source /etc/bash.bashrc && jupyter notebook --notebook-dir=/tf --ip 0.0.0.0 --no-browser --allow-root"]
25