forked from rocker-org/rocker-versioned2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·64 lines (42 loc) · 1.93 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
LATEST_TAG=4.1.0
CUDA=10.1
SHELL=/bin/bash
STACKFILES=$(wildcard stacks/*.json)
STACKS=$(notdir $(basename $(STACKFILES)))
COMPOSEFILES=$(addprefix compose/,$(addsuffix .yml,$(STACKS)))
PUSHES=$(addsuffix .push,$(STACKS))
.PHONY: clean build setup push latest
.PHONY: $(STACKS) $(PUSHES)
all: clean build push
latest: clean setup core-$(LATEST_TAG) geospatial-$(LATEST_TAG) binder-$(LATEST_TAG) shiny-$(LATEST_TAG) ml-cuda$(CUDA)-$(LATEST_TAG)
## Alternate way of specifying stacks by group
4.1.0: clean setup core-4.1.0 geospatial-4.1.0 binder-4.1.0 shiny-4.1.0 ml-cuda10.1-4.1.0
4.0.5: clean setup core-4.0.5 geospatial-4.0.5 binder-4.0.5 shiny-4.0.5 ml-cuda10.1-4.0.5
4.0.4: clean setup core-4.0.4 geospatial-4.0.4 binder-4.0.4 shiny-4.0.4 ml-cuda10.1-4.0.4
4.0.3: clean setup core-4.0.3 geospatial-4.0.3 binder-4.0.3 shiny-4.0.3 ml-cuda10.1-4.0.3
4.0.2: clean setup core-4.0.2 geospatial-4.0.2 binder-4.0.2 shiny-4.0.2 ml-cuda10.1-4.0.2
4.0.1: clean setup core-4.0.1 geospatial-4.0.1 binder-4.0.1 shiny-4.0.1 ml-cuda10.1-4.0.1
4.0.0: clean setup core-4.0.0 geospatial-4.0.0 binder-4.0.0 shiny-4.0.0 ml-cuda10.1-4.0.0
setup: $(COMPOSEFILES)
$(COMPOSEFILES): ./build/make-dockerfiles.R ./build/write-compose.R $(STACKFILES)
./build/make-dockerfiles.R
./build/write-compose.R
## Builds all stacks
build: $(STACKS)
$(STACKS): %: compose/%.yml
docker-compose -f compose/[email protected] build
docker-compose -f compose/[email protected] push
## Dependency order
binder-$(LATEST_TAG): geospatial-$(LATEST_TAG)
shiny-$(LATEST_TAG): core-$(LATEST_TAG)
geospatial-$(LATEST_TAG): core-$(LATEST_TAG) core-devel
geospatial-ubuntugis: core-$(LATEST_TAG)
geospatial-dev-osgeos: core-$(LATEST_TAG)
geospatial-4.0.0-ubuntu18.04: core-4.0.0-ubuntu18.04
## Assumes we are logged into the Docker Registry already
push: $(PUSHES)
$(PUSHES): %.push: %
docker-compose -f compose/$<.yml push; \
./tag.sh $< $(LATEST_TAG)
clean:
rm -f dockerfiles/Dockerfile_* compose/*.yml bakefiles/*.json