-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
107 lines (91 loc) · 2.9 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
100
101
102
103
104
105
106
107
DOCKER_USERNAME?=$(USER)
DOCKER_REPO?=$(DOCKER_USERNAME)
FLAVOR?=python3
ZIPLINE_REF?=master
TALIB_REF?=0.4.0
BRANCH?=$(shell git symbolic-ref --short -q HEAD)
all: build-zipline
docker-login:
@test -n "$(DOCKER_PASSWORD)" || \
{ echo Set $$DOCKER_PASSWORD env in order to make login; false; }
@echo "$(DOCKER_PASSWORD)" | docker login \
--username "$(DOCKER_USERNAME)" \
--password-stdin \
$(DOCKER_SERVER)
build-images: build-zipline-jupyter build-zipline-jupyterlab
build-zipline:
docker build \
--build-arg ZIPLINE_REF=$(ZIPLINE_REF) \
-t zipline:$(FLAVOR) \
-f $(FLAVOR)/Dockerfile \
$(FLAVOR)
docker tag zipline:$(FLAVOR) $(DOCKER_REPO)/zipline:$(FLAVOR)
build-zipline-talib: build-zipline-%: build-zipline
docker build \
--build-arg TALIB_REF=$(TALIB_REF) \
-t zipline:$* \
-f $(FLAVOR)/Dockerfile.$* \
$(FLAVOR)
docker tag zipline:$* $(DOCKER_REPO)/zipline:$(FLAVOR)-$*
build-zipline-dev: build-zipline-%: build-zipline-talib
docker build \
-t zipline:$* \
-f $(FLAVOR)/Dockerfile.$* \
$(FLAVOR)
docker tag zipline:$* $(DOCKER_REPO)/zipline:$(FLAVOR)-$*
build-zipline-jupyter \
build-zipline-jupyterlab: build-zipline-%: build-zipline-dev
docker build \
-t zipline:$* \
-f $(FLAVOR)/Dockerfile.$* \
$(FLAVOR)
docker tag zipline:$* $(DOCKER_REPO)/zipline:$(FLAVOR)-$*
push-images: \
push-zipline \
push-zipline-python-dev \
push-zipline-python-jupyter \
push-zipline-python-jupyterlab \
push-zipline-python-talib
push-latest: \
push-zipline-dev \
push-zipline-jupyter \
push-zipline-jupyterlab \
push-zipline-latest \
push-zipline-talib
push-auxilary-images: \
push-aux-dev \
push-aux-jupyter \
push-aux-jupyterlab \
push-aux-talib \
push-aux-zipline
push-zipline: build-zipline
docker push $(DOCKER_REPO)/zipline:$(FLAVOR)
push-zipline-python-dev \
push-zipline-python-jupyter \
push-zipline-python-jupyterlab \
push-zipline-python-talib: \
push-zipline-python-%: build-zipline-%
docker push $(DOCKER_REPO)/zipline:$(FLAVOR)-$*
push-zipline-latest: push-zipline-%: build-zipline
test "$(FLAVOR)" = "python3" || \
{ echo Tag 'latest' only used when $$FLAVOR=python3; false; }
docker tag zipline:$(FLAVOR) $(DOCKER_REPO)/zipline:$*
docker push $(DOCKER_REPO)/zipline:$*
push-zipline-dev \
push-zipline-jupyter \
push-zipline-jupyterlab \
push-zipline-talib: \
push-zipline-%: build-zipline-%
test "$(FLAVOR)" = "python3" || \
{ echo Only used when $$FLAVOR=python3 but got $(FLAVOR) instead; false; }
docker tag zipline:$* $(DOCKER_REPO)/zipline:$*
docker push $(DOCKER_REPO)/zipline:$*
push-aux-zipline: build-zipline
docker tag zipline:$(FLAVOR) $(DOCKER_REPO)/zipline:$(BRANCH)-$(FLAVOR)
docker push $(DOCKER_REPO)/zipline:$(BRANCH)-$(FLAVOR)
push-aux-dev \
push-aux-jupyter \
push-aux-jupyterlab \
push-aux-talib: push-aux-%: build-zipline-%
docker tag zipline:$* $(DOCKER_REPO)/zipline:$(BRANCH)-$(FLAVOR)-$*
docker push $(DOCKER_REPO)/zipline:$(BRANCH)-$(FLAVOR)-$*