https://github.com/drorata/mwe-jupyter-docker
Minimal Jupyter notebook using Docker
https://github.com/drorata/mwe-jupyter-docker
Last synced: 2 months ago
JSON representation
Minimal Jupyter notebook using Docker
- Host: GitHub
- URL: https://github.com/drorata/mwe-jupyter-docker
- Owner: drorata
- Created: 2017-03-14T18:59:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-10T18:07:33.000Z (almost 9 years ago)
- Last Synced: 2025-01-15T23:59:21.486Z (over 1 year ago)
- Language: Jupyter Notebook
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Motivation
[Reproducible research](http://drorata.github.io/posts/2017/Mar/16/pillars-of-reproducible-data-science-work/) is, in my opinion, an important aspect of data science work and should be exercised as much as possible.
As part of this effort, I started to explore Docker which allows the creation of an image which bundles both the code of the analysis and the data to be crunched.
In this repository I outline the most basic way to achieve this.
# Building the image
In this repository I'm building a docker image from which you could run a Jupyter notebook.
My objective is not merely running a notebook; this can be achieved by following the instruction in the [minimal notebook](https://github.com/jupyter/docker-stacks/tree/master/minimal-notebook).
What I'm trying is to build an image which will contain data and a notebook.
Note that this is very minimal and by and large not optimized or anything like that.
The magic happens with the [`Dockerfile`](./Dockerfile) where the instructions how to build the image are given.
See the inline comments for details.
Once you tuned the instructions, you can build the image on your local machine (after cloning this repository):
```bash
docker build -t mwe-jupyter-docker .
```
At this point, you can run the local image:
```bash
docker run -p 8888:8888 mwe-jupyter-docker
```
If you want to try out this image without cloning this repository, you should be able to pull it from [Docker hub](https://hub.docker.com/r/drorata/mwe-jupyter-docker/).
## The files:
This repository comprises of the following files
* `Dockerfile`: Instruction for the image creation
* `README.md`: This readme
* `data.csv`: Data generated by `generate-data.ipynb`
* `generate-data.ipynb`: Data generation notebook; it is included merely for the sake of completeness.
* `minimal-notebook.ipynb`: Data "analysis" notebook
* `.dockerignore`: an attempt to optimize the size of the image.
# Publishing the image
If you want to publish this image, the best option is to have an account on [docker hub](https://hub.docker.com).
Basically, the image should be tagged as `username/mwe-jupyter-docker`.
For more details, see the instruction in the [documentation](https://docs.docker.com/engine/getstarted/step_six/#step-1-tag-and-push-the-image).