Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Docker with JupyterLab and pre-installed libraries #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM dbaibak/jupyter-lab:latest

USER dev

# install python modules
ADD requirements.txt /home/dev/app/
RUN pip install --user --no-cache-dir -r requirements.txt
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ $ jupyter notebook --notebook-dir='<tutorial folder>'

Alternatively, you can download and install the (very large) Anaconda software distribution, found at https://store.continuum.io/.

## Installation via Docker

* Please follow Docker [installation instructions](https://docs.docker.com/install/) from the official site.
* `make build` - build image and create container with name *sklearn-lab*
* Now notebooks are available by url 127.0.0.1:8888

### Using
* `make start` - start container
* `make stop` - stop container
* 127.0.0.1:8888 - use notebooks

### Using bash and install packages
* `make start` - start container
* `make bash` - now you inside linux container
* `pip install --user package_name` - install new package

## Downloading the Tutorial Materials
I would highly recommend using git, not only for this tutorial, but for the
general betterment of your life. Once git is installed, you can clone the
Expand Down
25 changes: 25 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
SHELL=/bin/bash

args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`

%:
@:

build:
@docker build . -t jupyter-lab
@make run

run:
@docker run -it -d -v $(PWD):/home/dev/app -p 127.0.0.1:8888:8888 --name sklearn-lab jupyter-lab

start:
@docker start sklearn-lab

stop:
@docker stop sklearn-lab

remove:
@docker rm -f sklearn-lab

bash:
@docker exec -it --user dev sklearn-lab bash
62 changes: 62 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
backcall==0.1.0
bleach==2.1.3
cycler==0.10.0
decorator==4.3.0
entrypoints==0.2.3
html5lib==1.0.1
ipykernel==4.8.2
ipython==6.5.0
ipython-genutils==0.2.0
ipywidgets==7.3.2
jedi==0.12.1
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.0
jupyter-core==4.4.0
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.4
jupyter-nbextensions-configurator==0.4.0
jupyterlab==0.33.6
jupyterlab-launcher==0.11.2
kiwisolver==1.0.1
lxml==4.2.3
MarkupSafe==1.0
matplotlib==2.2.2
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
notebook==5.6.0
numpy==1.15.0
pandas==0.23.3
pandocfilters==1.4.2
parso==0.3.1
pexpect==4.6.0
pickleshare==0.7.4
Pillow==5.2.0
prometheus-client==0.3.1
prompt-toolkit==1.0.15
ptyprocess==0.6.0
Pygments==2.2.0
pyparsing==2.2.0
python-dateutil==2.7.3
pytz==2018.5
PyYAML==3.13
pyzmq==17.1.0
qtconsole==4.3.1
scikit-learn==0.19.2
scipy==1.1.0
seaborn==0.9.0
Send2Trash==1.5.0
simplegeneric==0.8.1
six==1.11.0
terminado==0.8.1
testpath==0.3.1
tornado==5.1
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.3.1