commit f04f21c7ecb7a2a77648726968ebdb44240a2e6b Author: J. Fernando Sánchez Date: Sat Jun 3 18:04:53 2017 +0200 First commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a2879df --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM jupyter/scipy-notebook + +MAINTAINER J. Fernando Sánchez + +RUN conda config --set always_yes yes --set changeps1 no + +RUN conda config \ + --add channels ostrokach \ + --add channels defaults \ + --add channels conda-forge + +RUN conda install -c ostrokach graph-tool=2.22 +RUN pip install jupyter_contrib_nbextensions +RUN pip install jupyter_nbextensions_configurator + +RUN jupyter nbextensions_configurator enable --user +RUN jupyter contrib nbextension install --user + +RUN mkdir -p $(jupyter --data-dir)/nbextensions +RUN git clone https://github.com/lambdalisue/jupyter-vim-binding $(jupyter --data-dir)/nbextensions/vim_binding +RUN chmod -R go-w $(jupyter --data-dir)/nbextensions/vim_binding +RUN jupyter nbextension enable --user vim_binding/vim_binding + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..06167a7 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +PYVERSIONS=3.5 3.4 2.7 +PYMAIN=$(firstword $(PYVERSIONS)) +NAME=scipynb +REPO=balkian +VERSION=$(shell cat VERSION) +IMAGENAME=$(REPO)/$(NAME):$(VERSION) +ROOTDIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) +WDIR=$(ROOTDIR)/.. + + +version: + date +%Y%m%d.%H%M > VERSION + +build: VERSION + docker build --pull . -t $(IMAGENAME) + +run: + docker run --rm -v $(WDIR)/.nbconfig:/home/jovyan/.jupyter/nbconfig -v $(WDIR)/:/home/jovyan/work/ -p 8888:8888 $(IMAGENAME) + +clean: + @docker ps -a | awk '/$(REPO)\/$(NAME)/{ split($$2, vers, "-"); if(vers[1] != "${VERSION}"){ print $$1;}}' | xargs docker rm 2>/dev/null|| true + @docker images | awk '/$(REPO)\/$(NAME)/{ split($$2, vers, "-"); if(vers[1] != "${VERSION}"){ print $$1":"$$2;}}' | xargs docker rmi 2>/dev/null|| true + @docker rmi $(NAME)-debug 2>/dev/null || true + + + diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..b3eeb17 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +20170504.1959