Skip to content

Instantly share code, notes, and snippets.

@kxxoling
Last active January 9, 2018 07:46
Show Gist options
  • Save kxxoling/3e424c103ec423517350ec442fe01961 to your computer and use it in GitHub Desktop.
Save kxxoling/3e424c103ec423517350ec442fe01961 to your computer and use it in GitHub Desktop.
Jupyter notebook with Python 2 and 3 based on anaconda image.
FROM continuumio/anaconda
RUN apt-get update && apt-get install -y python-dev python3-dev python-pip python3-pip
RUN conda create -y -n py27 python=2.7
RUN /bin/bash -c "source activate py27"
RUN conda install -y notebook ipykernel
RUN ipython kernel install --user
RUN conda create -y -n py36 python=3.6
RUN /bin/bash -c "source activate py36 && conda install -y notebook ipykernel && ipython kernel install --user"
RUN echo '🔥❄⚡'
EXPOSE 8888
@kxxoling
Copy link
Author

kxxoling commented Dec 9, 2017

Use this like docker run -it --rm -p 8888:8888 9031ef4d8b6c jupyter notebook --ip='0.0.0.0' --allow-root.

WARNING: This is just a demo instruction, use it at your own risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment