forked from yui-mhcp/detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (40 loc) · 1.56 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
COMPOSE_CMD = docker compose
USER_ID = $(shell id -u)
USER_NAME = $(shell id -u --name)
GROUP_ID = $(shell id -u)
CURRENT_DIR = $(shell pwd)
DATASET_DIR = /storage
DOCKER_DIR = docker/
BUILD_ARGS = --build-arg USER_ID=$(USER_ID) --build-arg USER_NAME=$(USER_NAME) --build-arg GROUP_ID=$(GROUP_ID)
run:
jupyter lab --ip 0.0.0.0 --no-browser --allow-root
experiment:
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-experiments.yml up
run-jupyter:
docker run -v $(DATASET_DIR):/storage -v $(CURRENT_DIR):/app --gpus all -it --rm -p 8888:8888 main-jupyter:latest
run-compose-jupyter:
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-jupyter.yml up
run-maggie:
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-maggie.yml up
build:
mv pretrained_models ../.
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-experiments.yml build $(BUILD_ARGS)
mv ../pretrained_models .
build-compose-jupyter:
mv pretrained_models ../.
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-jupyter.yml build $(BUILD_ARGS)
mv ../pretrained_models .
build-maggie:
mv pretrained_models ../.
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-maggie.yml build $(BUILD_ARGS)
mv ../pretrained_models .
build-jupyter:
mv pretrained_models ../.
docker build -t main-jupyter:latest -f $(DOCKER_DIR)Dockerfile-jupyter $(BUILD_ARGS) .
mv ../pretrained_models .
down:
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-jupyter.yml down
down-maggie:
$(COMPOSE_CMD) -f $(DOCKER_DIR)docker-compose-maggie.yml down
clean:
rm -rf pretrained_models/**/training-logs/checkpoints/