DEV Community

Cover image for Python and Jupyter Notebooks

Python and Jupyter Notebooks

Rose Day on March 28, 2018

Recently I have began to use Jupyter notebooks with Python but have struggled with the constant need to download dependencies or have something not...
Collapse
 
mahmoudhossam profile image
Mahmoud Hossam • Edited

Great tutorial, good work!

My suggestion is to learn docker compose next to avoid having to type incredibly lengthy docker run commands.

It also helps you keep everything under version control so you can easily share your creations with other people with minimal guesswork on their part.

Collapse
 
rosejcday profile image
Rose Day

Thanks, I'll have to check that out!

Collapse
 
alysivji profile image
Aly Sivji • Edited

Great post! I'm a huge fan of using Docker for Data Science.

I gave a talk a few months ago on how to incorporate Docker into various Data Science Workflows. Hope you find it useful!

Collapse
 
rosejcday profile image
Rose Day

Thanks! I will look into it. Just started using it and loving it already.

Collapse
 
eqmapbox profile image
Erin Quinn

Awesome post @rosejcday . Mapbox actually just launched a library for location data visualizations with Jupyter Notebooks, check it out and lmk what you think! github.com/mapbox/mapboxgl-jupyter

Collapse
 
preslavrachev profile image
Preslav Rachev

This post is a great intro to setting up Jupyter using Docker! 👍🏼

I fought with a similar setup myself, after deciding to stop misusing my MacBook for data science experiments, and deploy a Docker container on the Google Cloud instead. Besides the things you have listed in your post, I had to tackle bundling a dedicated SHA-hashed Jupyter password, because my instance is publicly accessible over the Internet. Another issue I had to deal with was bundling the image with a private key for accessing the git repository where I keep my experiments. Not all without issues, but I managed. Maybe, I should sit down and write a post about this. Perhaps, it will be helpful to you and others.

Collapse
 
attomos profile image
Nattaphoom Chaipreecha

The Docker Hub link is incorrect in

"Download the Docker image from Docker Hub."

Collapse
 
rosejcday profile image
Rose Day

Weird! It was the right link when I checked, try again and see if it works now for you.

Collapse
 
attomos profile image
Nattaphoom Chaipreecha

It works now. Thanks for the article : )

Collapse
 
iampaulolopez profile image
Paulo López

I love docker and also how easy it is to use for Data Science. Thank you.

Collapse
 
felipem775 profile image
Felipe Maza

Why you don't use virtualenv?

Collapse
 
rosejcday profile image
Rose Day

What would the benefit of using virtualenv be inside a docker container? I have researched it but everyone seems to have mixed views on using it or not using it.

Collapse
 
felipem775 profile image
Felipe Maza

I mean, use virtualenv instead of docker

Collapse
 
lukaszkuczynski profile image
lukaszkuczynski

I like the portability of Jupiter too. I use it to 1) write stories out of data for management and to 2) write tutorials for Python. What are your use cases?

Collapse
 
rosejcday profile image
Rose Day

At the moment I use it mainly for school. It has been great for school projects that need to be shared between a team.