-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (39 loc) · 1.07 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
# The Makefile defines all builds/tests steps
# include .env file
include docker/conf.list
# compose command to merge production file and and dev/tools overrides
COMPOSE?=docker-compose -p $(PROJECT_NAME) -f docker-compose.yml
export COMPOSE
export APP_PORT
export NOTEBOOK_PORT
export NVIDIA_VISIBLE_DEVICES
# this is usefull with most python apps in dev mode because if stdout is
# buffered logs do not shows in realtime
PYTHONUNBUFFERED=1
export PYTHONUNBUFFERED
docker/env.list:
# Copy default config
cp docker/env.list.sample docker/env.list
docker/conf.list:
# Copy default config
cp docker/conf.list.sample docker/conf.list
dev: docker/env.list docker/conf.list
$(COMPOSE) up
up: docker/env.list docker/conf.list
$(COMPOSE) up -d
stop:
$(COMPOSE) stop
down:
$(COMPOSE) down --remove-orphans
build:
$(COMPOSE) build #--no-cache
exec:
$(COMPOSE) exec torch-notebook bash
logs:
$(COMPOSE) logs -f --tail 50
test:
$(COMPOSE) exec torch-notebook pytest
docs/html:
$(COMPOSE) exec torch-notebook make -C /workspace/iaflash/docs html
docs: docs/html
echo "Post"