-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (42 loc) · 1.09 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
PROJ_NAME=iquaflow
CONTAINER_NAME="${PROJ_NAME}-${USER}"
ifndef DS_VOLUME
DS_VOLUME=/scratch
endif
ifndef NB_PORT
NB_PORT=8888
endif
ifndef MLF_PORT
MLF_PORT=5000
endif
help:
@echo "build -- builds the docker image"
@echo "dockershell -- raises an interactive shell docker"
@echo "notebookshell -- launches a notebook server"
@echo "mlflow -- launches an mlflow server"
build:
docker build -t $(PROJ_NAME) .
chmod 775 ./download.sh
./download.sh
dockershell:
docker run --rm --name $(CONTAINER_NAME) --gpus all -p 9197:9197 \
-v $(shell pwd):/iqf -v $(DS_VOLUME):/data \
-it $(PROJ_NAME)
notebookshell:
docker run --name $(CONTAINER_NAME)-nb --gpus all --privileged -itd --rm \
-p ${NB_PORT}:${NB_PORT} \
-v $(shell pwd):/iqf \
-v $(DS_VOLUME):/data \
$(PROJ_NAME) \
jupyter notebook \
--NotebookApp.token='IQF' \
--no-browser \
--ip=0.0.0.0 \
--allow-root \
--port=${NB_PORT}
mlflow:
docker run --name $(CONTAINER_NAME)-mlf --privileged -itd --rm \
-p ${MLF_PORT}:${MLF_PORT} \
-v $(shell pwd):/iqf -v $(DS_VOLUME):/data \
$(PROJ_NAME) \
mlflow ui --host 0.0.0.0:$(MLF_PORT)