Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (42 loc) · 1.31 KB
/
Copy pathMakefile
File metadata and controls
50 lines (42 loc) · 1.31 KB
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
# Version and project can be overridden with the following:
# make target VERSION=0.XY PROJECT=foo-project
VERSION?=0.12
PROJECT?=minigo-pub
make echo:
echo $(VERSION)
echo $(PROJECT)
make gpu-image:
mkdir -p staging/data
cp ../*.py staging/
cp ../data/names.txt staging/data/
cp ../requirements.txt staging/
cp player_wrapper.sh staging/
docker build -f Dockerfile.gpu -t "gcr.io/$(PROJECT)/minigo-gpu-player:$(VERSION)" .
rm staging/*.py
rm staging/requirements.txt
rm staging/player_wrapper.sh
image:
mkdir -p staging/data
cp ../*.py staging/
cp -r ../data staging/
cp ../requirements-cpu.txt staging/
cp player_wrapper.sh staging/
docker build -t "gcr.io/$(PROJECT)/minigo-player:$(VERSION)" .
rm staging/*.py
rm -r staging/data
rm staging/requirements-cpu.txt
rm staging/player_wrapper.sh
image-clean:
mkdir -p staging/
cp ../*.py staging/
cp ../requirements-cpu.txt staging/
cp player_wrapper.sh staging/
docker build --no-cache -t "gcr.io/$(PROJECT)/minigo-player:$(VERSION)" .
rm staging/*.py
rm staging/requirements-cpu.txt
rm staging/player_wrapper.sh
push: image
gcloud docker -- push "gcr.io/$(PROJECT)/minigo-player:$(VERSION)"
gpu-push: gpu-image
gcloud docker -- push "gcr.io/$(PROJECT)/minigo-gpu-player:$(VERSION)"
.PHONY: image push