<jupyter_start><jupyter_text>Docker scipy- and minimal-notebookThe minimal-notebook image has been written with data science optimization in mindhttps://www.dataquest.io/blog/docker-data-science/http://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.htmljupyter-datascience-notebookhttps://github.com/jupyter/docker-stacks/tree/master/scipy-notebookhttps://towardsdatascience.com/docker-for-data-science-9c0ce73e8263  Pull image<jupyter_code># !docker run jupyter/minimal-notebook
!docker pull jupyter/scipy-notebook
# https://github.com/jupyter/docker-stacks/tree/master/scipy-notebook<jupyter_output><empty_output><jupyter_text>Using this command, we'll be pulling the latest image of the minimal-notebook from the jupyter Docker hub account. You'll know it has ran successfully if you see the following output:  Port container flag-p :<jupyter_code># !docker run -p 8888:8888 jupyter/minimal-notebook<jupyter_output><empty_output><jupyter_text>Sharing files - mounting directory:volume<jupyter_code># !mkdir ~/docker_notebooks<jupyter_output><empty_output><jupyter_text>Mounting flag-v :  Installing packages - only for a specific Docker instance (runtime image)<jupyter_code>!docker exec <container_id> pip install tensorflow<jupyter_output><empty_output><jupyter_text>Build image<jupyter_code>!mkdir ~/docker/docker_lauthom && cd ~/docker/docker_lauthom
python36 = 'https://repo.anaconda.com/archive/Anaconda3-5.1.0-Linux-x86_64.sh'
%%writefile ~/docker/docker_lauthom/Dockerfile

# We will use Ubuntu for our image
FROM ubuntu
# Updating Ubuntu packages
RUN apt-get update && yes|apt-get upgrade
# Adding wget and bzip2
RUN apt-get install -y wget bzip2
# Anaconda installing
RUN wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
RUN bash Anaconda3-5.0.1-Linux-x86_64.sh -b
RUN rm Anaconda3-5.0.1-Linux-x86_64.sh
# Set path to conda
ENV PATH /root/anaconda3/bin:$PATH
# Updating Anaconda packages
RUN conda update conda
RUN conda update anaconda
RUN conda update --all
# Configuring access to Jupyter
RUN mkdir /opt/notebooks
RUN jupyter notebook --generate-config --allow-root
RUN echo "c.NotebookApp.password = u'<PASSWORD>'" >> /root/.jupyter/jupyter_notebook_config.py
# Jupyter listens port: 8888
EXPOSE 8888
# Run Jupyter notebook as Docker main process
CMD ["jupyter", "notebook", "--allow-root", "--notebook-dir=/opt/notebooks", "--ip='*'", "--port=8888", "--no-browser"]
!docker build -t docker-data-science
!docker run --name docker-data-science -p 8888:8888 -v "$PWD/notebooks:/opt/notebooks" -d docker-data-science
!docker rm -f docker-data-science
# stop container<jupyter_output><empty_output><jupyter_text>Make github repo - login @ github - create new repo -<jupyter_code>git init
echo "notebooks" > .gitignore
git add .
git commit -m "first commit"
git remote add origin https://github.com/evheniy/docker-data-science.git
git push -u origin master
git clone https://github.com/evheniy/docker-data-science.git<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11678345011678345, 'fraction_numerical': 0.02435769102435769, 'mean_word_length': 5.503253796095445, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 30, 'https://': 8, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '464141', 'license': 'MIT', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1054, 'n_words': 242, 'path': '_productivity/docker_3.ipynb', 'repo_name': 'aixpact/data-science', 'size': '3045'}