forked from osai-ai/tensor-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (33 loc) · 700 Bytes
/
Makefile
File metadata and controls
40 lines (33 loc) · 700 Bytes
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
NAME?=argus-tensor-stream
TORCH_VERSION?=1.4.0
DOCKER_NAME="$(NAME)-$(TORCH_VERSION)"
GPUS?=all
ifeq ($(GPUS),none)
GPUS_OPTION=
else
GPUS_OPTION=--gpus=$(GPUS)
endif
.PHONY: all build stop build-whl
all: stop build build-whl
build:
docker build \
--build-arg TORCH_VERSION=${TORCH_VERSION} \
-t $(DOCKER_NAME) .
stop:
-docker stop $(DOCKER_NAME)
-docker rm $(DOCKER_NAME)
build-whl:
docker run --rm -it \
$(GPUS_OPTION) \
-v $(shell pwd)/dist:/app/dist \
--name=$(DOCKER_NAME) \
$(DOCKER_NAME) \
python3 setup.py sdist bdist_wheel
run-dev:
docker run --rm -it \
$(GPUS_OPTION) \
--net=host \
-v $(shell pwd):/app \
--name=$(DOCKER_NAME) \
$(DOCKER_NAME) \
bash