-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
122 lines (103 loc) · 2.25 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
SHELL := /bin/bash
host-ubuntu:
docker build . \
-t tvm-host-ubuntu \
--progress=plain \
-f docker/host/ubuntu/Dockerfile.host-ubuntu; \
docker tag tvm-host-ubuntu tvm-host
host-cuda:
docker build . \
-t tvm-host-cuda \
--progress=plain \
-f docker/host/cuda/Dockerfile.host-cuda; \
docker tag tvm-host-cuda tvm-host
dependencies:
docker build . \
-t tvm-dependencies \
--progress=plain \
-f docker/dependencies/Dockerfile.dependencies
build: dependencies
docker build . \
-t tvm-build \
--progress=plain \
-f docker/build/Dockerfile.build
user: build
docker build . \
-t tvm-user \
--progress=plain \
-f docker/user/Dockerfile.user
devel: build
docker build . \
-t tvm-devel \
--progress=plain \
-f docker/devel/Dockerfile.devel
rpc: build
docker build \
-t tvm-rpc \
--progress=plain \
-f docker/rpc/Dockerfile.rpc \
.
run-devel:
GIT_USERNAME="$(shell git config user.name)" \
GIT_EMAIL="$(shell git config user.email)" \
docker run \
-v $(HOME)/.ssh:/home/tvm/.user_ssh:ro \
-v $(HOME)/.vim:/home/tvm/.vim:ro \
-v $(CURDIR)/workspace:/home/tvm/workspace \
-e GIT_USERNAME \
-e GIT_EMAIL \
-e GITHUB_USERNAME \
-p 8081:8081 \
-d \
--name tvm_devel \
tvm-devel \
sleep infinity
gpu-devel:
GIT_USERNAME="$(shell git config user.name)" \
GIT_EMAIL="$(shell git config user.email)" \
docker run \
-v $(HOME)/.ssh:/home/tvm/.user_ssh:ro \
-v $(HOME)/.vim:/home/tvm/.vim:ro \
-v $(CURDIR)/workspace:/home/tvm/workspace \
-e GIT_USERNAME \
-e GIT_EMAIL \
-e GITHUB_USERNAME \
-p 8081:8081 \
-d \
--name tvm_devel \
tvm-devel \
--gpus all \
sleep infinity
stop-devel:
docker stop tvm_devel
start-devel:
docker start tvm_devel
shell-devel:
docker exec \
-it \
-e GITHUB_USERNAME \
tvm_devel \
bash
rm-devel:
docker stop tvm_devel; \
docker rm tvm_devel;
sphinx-serve:
docker exec \
-d \
tvm_devel \
bash -c "cd tvm/docs/_staging ; sphinx-serve"
docs:
docker exec \
tvm_devel \
bash -c "cd tvm/docs; TVM_TUTORIAL_EXEC_PATTERN=/vta/tutorials make html"
tvm:
docker exec \
tvm_devel \
bash -c "cd tvm/build; make -j 8"
clean:
docker stop tvm_devel
docker rm tvm_devel
imageclean:
docker image rm tvm-devel
rm:
docker rm $$(docker ps -a -q)