-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (43 loc) · 959 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
host_ssh_port=2233
image_name=cardacmapping
container_name=cardacmapping
data_path=/mnt/hdd2/se
run: build
nvidia-docker run \
-it --rm \
--shm-size 1G \
--network host \
-e NVIDIA_VISIBLE_DEVICES=1 \
--name $(container_name) \
-v $(shell pwd):/workspace \
-v $(data_path):/data/se:ro \
$(image_name) \
/bin/bash
build:
docker build --tag $(image_name) .
push:
docker push $(image_name)
pull:
docker pull $(image_name)
stop:
docker stop $(container_name)
tensorboard: build
docker run \
-it --rm \
--network host \
-p $(host_tensorboard_port):6006 \
--name tensorboard \
-v $(shell pwd):/workspace \
$(image_name) \
tensorboard --logdir artifacts/ --reload_multifile True --bind_all
ssh: build
nvidia-docker run \
-dt --rm \
--shm-size 1G \
-p $(host_ssh_port):22 \
-e NVIDIA_VISIBLE_DEVICES=0,1 \
--name $(container_name) \
-v $(shell pwd):/workspace \
-v $(data_path):/data/se:ro \
$(image_name) \
/usr/sbin/sshd -D