-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
99 lines (69 loc) · 3.36 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
94
95
96
97
98
99
SHELL := /bin/bash
ECVL_REV := $(shell git -C third_party/ecvl rev-parse --short HEAD)
PYEDDL_REV := $(shell git -C third_party/pyeddl rev-parse --short HEAD)
JENKINS_IMG := dhealth/dev-pyecvl-base-cpu
JENKINS_TAG := $(ECVL_REV)-$(PYEDDL_REV)
# all: pyecvl-cpu pyecvl-gpu pyecvl-cudnn
# eddl images
eddl-base: third_party/pyeddl
make -C $< eddl-base
eddl-cpu: third_party/pyeddl
make -C $< eddl-cpu
eddl-gpu: third_party/pyeddl
make -C $< eddl-gpu
eddl-cudnn: third_party/pyeddl
make -C $< eddl-cudnn
# ecvl/pyecvl images
ecvl-base-cpu: docker/Dockerfile.ecvl-base eddl-cpu
docker build --build-arg target=cpu -t dhealth/dev-ecvl-base-cpu -f $< .
ecvl-base-gpu: docker/Dockerfile.ecvl-base eddl-gpu
docker build --build-arg target=gpu -t dhealth/dev-ecvl-base-gpu -f $< .
ecvl-base-cudnn: docker/Dockerfile.ecvl-base eddl-cudnn
docker build --build-arg target=cudnn -t dhealth/dev-ecvl-base-cudnn -f $< .
ecvl-cpu: docker/Dockerfile.ecvl-cpu ecvl-base-cpu
docker build -t dhealth/dev-ecvl-cpu -f $< .
ecvl-gpu: docker/Dockerfile.ecvl-gpu ecvl-base-gpu
docker build -t dhealth/dev-ecvl-gpu -f $< .
ecvl-cudnn: docker/Dockerfile.ecvl-cudnn ecvl-base-cudnn
docker build -t dhealth/dev-ecvl-cudnn -f $< .
pyecvl-base-cpu: docker/Dockerfile.pyecvl-base ecvl-cpu
docker build --build-arg target=cpu -t dhealth/dev-pyecvl-base-cpu -f $< .
pyecvl-base-gpu: docker/Dockerfile.pyecvl-base ecvl-gpu
docker build --build-arg target=gpu -t dhealth/dev-pyecvl-base-gpu -f $< .
pyecvl-base-cudnn: docker/Dockerfile.pyecvl-base ecvl-cudnn
docker build --build-arg target=cudnn -t dhealth/dev-pyecvl-base-cudnn -f $< .
pyecvl-cpu: docker/Dockerfile.pyecvl-cpu pyecvl-base-cpu
docker build -t dhealth/dev-pyecvl-cpu -f $< .
pyecvl-gpu: docker/Dockerfile.pyecvl-gpu pyecvl-base-gpu
docker build -t dhealth/dev-pyecvl-gpu -f $< .
pyecvl-cudnn: docker/Dockerfile.pyecvl-cudnn pyecvl-base-cudnn
docker build -t dhealth/dev-pyecvl-cudnn -f $< .
docs: docker/Dockerfile.docs pyecvl-cpu
docker build -t dhealth/dev-pyecvl-docs -f $< .
ecvl-minimal: docker/Dockerfile.ecvl-minimal
docker build -t dhealth/dev-ecvl-minimal -f $< .
pyecvl-minimal: docker/Dockerfile.pyecvl-minimal ecvl-minimal
docker build -t dhealth/dev-pyecvl-minimal -f $< .
#commands
test-cpu: pyecvl-cpu
docker run --rm dhealth/dev-pyecvl-cpu pytest tests
test-gpu: pyecvl-gpu
docker run --rm dhealth/dev-pyecvl-gpu pytest tests
test-cudnn: pyecvl-cudnn
docker run --rm dhealth/dev-pyecvl-cudnn pytest tests
test-minimal: pyecvl-minimal
docker run --rm dhealth/dev-pyecvl-minimal pytest tests
run-examples-cpu: pyecvl-cpu
docker run --rm dhealth/dev-pyecvl-cpu bash examples/run_all.sh /ecvl/examples/data
run-examples-gpu: pyecvl-gpu
docker run --rm dhealth/dev-pyecvl-gpu bash examples/run_all.sh /ecvl/examples/data
run-examples-cudnn: pyecvl-cudnn
docker run --rm dhealth/dev-pyecvl-cudnn bash examples/run_all.sh /ecvl/examples/data
run-examples-minimal: pyecvl-minimal
docker run --rm dhealth/dev-pyecvl-minimal bash examples/run_all.sh /ecvl/examples/data
get-docs: docs
rm -rf /tmp/html && docker run --rm dhealth/dev-pyecvl-docs bash -c "tar -c -C /pyecvl/docs/source/_build html" | tar -x -C /tmp
update-jenkins-image: pyecvl-base-cpu
docker tag $(JENKINS_IMG) $(JENKINS_IMG):$(JENKINS_TAG) && \
docker push $(JENKINS_IMG):$(JENKINS_TAG) && \
sed -i 's|$(JENKINS_IMG):[a-f0-9-]\+|$(JENKINS_IMG):$(JENKINS_TAG)|g' Jenkinsfile