mirror of
https://github.com/balkian/phd-dockerenv.git
synced 2024-11-23 12:02:30 +00:00
First commit
This commit is contained in:
commit
f04f21c7ec
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM jupyter/scipy-notebook
|
||||
|
||||
MAINTAINER J. Fernando Sánchez <j@sinpapel.es>
|
||||
|
||||
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
|
||||
|
||||
|
26
Makefile
Normal file
26
Makefile
Normal file
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user