-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (18 loc) · 785 Bytes
/
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
cplex_path := $(dir $(shell which cplex))
all: build_latest
all_examples: Output/LPsolve/example_result.Rds Output/CPLEX/example_result.Rds
.PHONY: build
build_%:
docker build -t bartoszbartmanski/carnival:$* -f Dockerfile .
example_result.Rds:
docker run -it -v `pwd`:/data/ --rm bartoszbartmanski/carnival:latest /example/run_example.sh /data/
cplex_example.Rds:
docker run -it --rm -v `pwd`:/data/ -v ${cplex_path}:${cplex_path} bartoszbartmanski/carnival:latest /example/other_solvers.R cplex ${cplex_path}/cplex /data/$@
.PHONY: push_%
push_%: build_%
docker push bartoszbartmanski/carnival:$*
.PHONY: clean_images
clean_images:
docker images -a | grep "carnival" | awk '{print $$3}' | xargs docker rmi
clean:
rm -f *.RData *.lp *.h5 *.dot *.Rds *.txt *.sol *.log