forked from probcomp/developer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
93 lines (76 loc) · 3.75 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# tools
SHELL := /bin/bash
DEVELOP_REPOS ?= "bayeslite"
# env vars
NB_UID := $(shell id -u)
# Default command and help messages
.PHONY: default help
default: help
bash: ## Run a bash shell inside the app container
up: ## Launch the dev environment
.PHONY: up
up:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} up
.PHONY: down
down:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} down
.PHONY: pull
pull:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose pull
.PHONY: bash
bash:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan -s
.PHONY: ipython
ipython:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && ipython"
.PHONY: julia
julia:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "docker-entrypoint.sh julia"
.PHONY: bootstrap
bootstrap:
@bash bin/bootstrap.sh
.PHONY: reinstall
reinstall:
@bash bin/reinstall.sh
## bayeslite
.PHONY: bayeslite
bayeslite:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd bayeslite && rm -rf build && python setup.py build"
.PHONY: bayeslite-install
bayeslite-install:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd bayeslite && python setup.py install"
.PHONY: bayeslite-test
bayeslite-test:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd bayeslite && bash check.sh"
## cgpm
.PHONY: cgpm
cgpm:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd cgpm && rm -rf build && python setup.py build"
.PHONY: cgpm-test
cgpm-test:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd cgpm && bash check.sh"
## crosscat
.PHONY: crosscat
crosscat:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd crosscat && rm -rf build && python setup.py build"
.PHONY: crosscat-test
crosscat-test:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd crosscat && bash check.sh"
## iventure
.PHONY: iventure
iventure:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd iventure && rm -rf build && python setup.py build"
.PHONY: iventure-install
iventure-install:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd iventure && python setup.py install"
.PHONY: iventure-test
iventure-test:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd iventure && bash check.sh"
## loom
.PHONY: loom
loom:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd loom && pip install --upgrade ."
## tutorials
.PHONY: notebook-test
notebook-test:
@NB_UID=${NB_UID} DEVELOP_REPOS="${DEVELOP_REPOS}" docker-compose -p ${USER} exec notebook sudo -E -u jovyan bash -c "source activate python2 && cd tutorials && python -m pytest"