-
Notifications
You must be signed in to change notification settings - Fork 181
/
Makefile
49 lines (33 loc) · 1.03 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
# Usage:
# make dev build and run /bin/bash in container.
# make notebook build and run jupyter notebook server.
.PHONY: dev notebook build
help:
@echo 'Makefile for DeepOSM'
@echo ''
@echo 'make dev build and run /bin/bash'
@echo 'make notebook build and run jupyter notebook server'
IMAGE_NAME = deeposm
Dockerfile.cpu: Dockerfile.base
cp $< $@
build-cpu: Dockerfile.cpu
docker build -f $< -t $(IMAGE_NAME):latest .
Dockerfile.gpu: Dockerfile.base
sed 's|^FROM tensorflow/tensorflow:.*$$|\0-gpu|' $< > $@
build-gpu: Dockerfile.gpu
docker build -f $< -t $(IMAGE_NAME):latest-gpu .
build: build-cpu
dev-cpu: build-cpu
./docker_run.sh cpu
dev-gpu: build-gpu
./docker_run.sh gpu
dev: dev-cpu
test: build-cpu
./docker_run.sh cpu python -m unittest discover
update-deeposmorg: build-gpu
./docker_run.sh gpu python bin/update_deeposm.org
notebook-cpu: build-cpu
./docker_run.sh cpu ./run_jupyter.sh
notebook-gpu: build-gpu
./docker_run.sh gpu ./run_jupyter.sh
notebook: notebook-cpu