-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
60 lines (42 loc) · 2.21 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
SHELL := /bin/bash
EDDL_REV := $(shell git -C third_party/eddl rev-parse --short HEAD)
all: pyeddl-cpu pyeddl-gpu pyeddl-cudnn
# images
eddl-base: docker/Dockerfile.eddl-base
docker build -t dhealth/dev-eddl-base -f $< .
eddl-cpu: docker/Dockerfile.eddl-cpu eddl-base
docker build -t dhealth/dev-eddl-cpu -f $< .
eddl-gpu: docker/Dockerfile.eddl-gpu eddl-base
docker build -t dhealth/dev-eddl-gpu -f $< .
eddl-cudnn: docker/Dockerfile.eddl-cudnn eddl-base
docker build -t dhealth/dev-eddl-cudnn -f $< .
pyeddl-base-cpu: docker/Dockerfile.pyeddl-base eddl-cpu
docker build --build-arg target=cpu -t dhealth/dev-pyeddl-base-cpu -f $< .
pyeddl-base-gpu: docker/Dockerfile.pyeddl-base eddl-gpu
docker build --build-arg target=gpu -t dhealth/dev-pyeddl-base-gpu -f $< .
pyeddl-base-cudnn: docker/Dockerfile.pyeddl-base eddl-cudnn
docker build --build-arg target=cudnn -t dhealth/dev-pyeddl-base-cudnn -f $< .
pyeddl-cpu: docker/Dockerfile.pyeddl-cpu pyeddl-base-cpu
docker build -t dhealth/dev-pyeddl-cpu -f $< .
pyeddl-gpu: docker/Dockerfile.pyeddl-gpu pyeddl-base-gpu
docker build -t dhealth/dev-pyeddl-gpu -f $< .
pyeddl-cudnn: docker/Dockerfile.pyeddl-cudnn pyeddl-base-cudnn
docker build -t dhealth/dev-pyeddl-cudnn -f $< .
docs: docker/Dockerfile.docs pyeddl-cpu
docker build -t dhealth/dev-pyeddl-docs -f $< .
#commands
test-pyeddl-cpu: pyeddl-cpu
docker run --rm dhealth/dev-pyeddl-cpu pytest tests
test-pyeddl-gpu: pyeddl-gpu
docker run --rm dhealth/dev-pyeddl-gpu pytest tests
test-pyeddl-cudnn: pyeddl-cudnn
docker run --rm dhealth/dev-pyeddl-cudnn pytest tests
get-docs: docs
rm -rf /tmp/html && docker run --rm dhealth/dev-pyeddl-docs bash -c "tar -c -C /pyeddl/docs/source/_build html" | tar -x -C /tmp
update-jenkins-images: pyeddl-base-cpu pyeddl-base-gpu
for t in cpu gpu; do \
docker tag dhealth/dev-pyeddl-base-$${t} dhealth/dev-pyeddl-base-$${t}:$(EDDL_REV) && \
docker push dhealth/dev-pyeddl-base-$${t}:$(EDDL_REV); \
done
sed -i 's/\(dev-pyeddl-base-[cg]pu\):[a-f0-9]\+/\1:$(EDDL_REV)/g' Jenkinsfile
.PHONY: all eddl-base eddl-cudnn get-docs pyeddl-base-cudnn pyeddl-cpu pyeddl-gpu test-pyeddl-cudnn docs eddl-cpu eddl-gpu pyeddl-base-cpu pyeddl-base-gpu pyeddl-cudnn test-pyeddl-cpu test-pyeddl-gpu