-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (27 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
IMAGE?=integralsw/osa-python:$(shell git describe --always)
IMAGE_LATEST?=integralsw/osa-python:latest
DUSER := $(shell id -u)
push: build
docker push $(IMAGE)
docker push $(IMAGE_LATEST)
build: Dockerfile
docker build . -t $(IMAGE)
docker build . -t $(IMAGE_LATEST)
pull:
docker pull $(IMAGE)
docker pull $(IMAGE_LATEST)
test: build
docker run -e HOME_OVERRRIDE=/tmp-home -v $(PWD):/tmp-home -it integralsw/osa-python:latest bash -c 'source /init.sh; bash $$HOME/self-test.sh'
notebook: build
docker run -v $(PWD):/home/jovyan -it --entrypoint='' -p 8889:8889 --user $(DUSER) $(IMAGE) bash -c "source /init.sh;jupyter notebook --ip 0.0.0.0 --no-browser --port=8889"
run:
docker run -v $(PWD):/home/jovyan --entrypoint='' -p 8899:8889 --user $(DUSER) $(IMAGE) bash -c "\
source /init.sh; \
papermill --log-output GX5m1.ipynb GX5m1-output.ipynb 2>&1 | awk '{printf "\""notebook log >>> "\""} 1' \
"
run-one: # in docker:dind
docker run --entrypoint='' $(IMAGE) bash -c "\
source /init.sh; \
papermill --log-output GX5m1.ipynb GX5m1-output.ipynb 2>&1; \
exit $$? \
"