-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (51 loc) · 1.66 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
DOCKER_IMAGE = "kerassimclrv2:latest"
GPU_NUMBERS = $(shell nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
init:
mkdir logs data
build:
docker build --no-cache -t $(DOCKER_IMAGE) dockerfile
run:
docker run -it --rm \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) python /workspace/$(FILENAME)
run-gpus:
docker run --gpus all -it --shm-size=1g --ulimit memlock=-1 --rm \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) python /workspace/$(FILENAME)
ipython:
docker run -it --rm \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) ipython
ipython-gpus:
docker run --gpus all -it --shm-size=1g --ulimit memlock=-1 --rm \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) ipython
jupyterlab:
docker run -it --rm -p 8888:8888 \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) /run_jupyter.sh --allow-root
jupyterlab-gpus:
docker run --gpus all -it --shm-size=1g --ulimit memlock=-1 --rm -p 8888:8888 \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) /run_jupyter.sh --allow-root
bash:
docker run -it --rm \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) bash
bash-gpus:
docker run --gpus all -it --shm-size=1g --ulimit memlock=-1 --rm \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) bash
tensorboard:
docker run -it -p 6006:6006 \
-v $(shell pwd):/workspace/ \
-v $(MNT_DIR):/mnt/ \
$(DOCKER_IMAGE) tensorboard --logdir /workspace/$(LOGDIR) --bind_all