-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (67 loc) · 2.46 KB
/
Copy pathMakefile
File metadata and controls
88 lines (67 loc) · 2.46 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
DOCKER_COMPOSE_ENV_FILE=.env
UID=$$(id -u)
HOSTNAME:=$(shell uname -n)
TAG_DEV=dev
TAG_MAIN=main
DOCKER_COMPOSE_COMMAND=\
HOSTNAME=$(HOSTNAME) docker compose \
--env-file $(DOCKER_COMPOSE_ENV_FILE)
DOCKER_COMPOSE_COMMAND_TASK_RUNNER=\
$(DOCKER_COMPOSE_COMMAND) \
-p task-runner-$(UID) \
-f docker-compose.yml
DOCKER_COMPOSE_COMMAND_TASK_RUNNER_CUDA=\
$(DOCKER_COMPOSE_COMMAND) \
-p task-runner-cuda-$(UID) \
-f docker-compose.cuda.yml
DOCKER_COMPOSE_COMMAND_TASK_RUNNER_LITE=\
$(DOCKER_COMPOSE_COMMAND) \
-p task-runner-lite-$(UID) \
-f docker-compose.lite.yml
DOCKER_COMPOSE_COMMAND_TASK_RUNNER_UNIFIED=\
$(DOCKER_COMPOSE_COMMAND) \
-p task-runner-unified-$(UID) \
-f docker-compose.unified.yml
.PHONY: %
%: help
help:
@echo Run:
@echo " make task-runner-up: starts task-runner building from source"
@echo " make task-runner-lite-up: starts task-runner in lite mode (faster)"
@echo " make task-runner-cuda-up: starts task-runner with CUDA support"
@echo " make task-runner-unified-up: starts task-runner with file-tracker unified"
@echo " make task-runner-down stops task-runner building from source"
@echo " make task-runner-lite-down stops task-runner in lite mode"
@echo " make task-runner-cuda-down stops task-runner with CUDA support"
@echo " make task-runner-unified-down stops task-runner with file-tracker unified"
@echo Utils:
@echo " make lint-fix: run linter and fix issues"
@echo " make format: run formatter"
@echo " make style: run formatter and linter"
setup-apptainer-folder:
mkdir -p apptainer
chmod 777 apptainer
task-runner-up:setup-apptainer-folder
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER) up --build
task-runner-lite-up:setup-apptainer-folder
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_LITE) up --build
task-runner-cuda-up:setup-apptainer-folder
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_CUDA) up --build
task-runner-unified-up:setup-apptainer-folder
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_UNIFIED) up --build
task-runner-down:
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER) down
task-runner-lite-down:
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_LITE) down
task-runner-cuda-down:
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_CUDA) down
task-runner-unified-down:
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_UNIFIED) down
lint-fix:
ruff check --config=./pyproject.toml --fix
format:
yapf . --in-place --recursive --parallel --exclude=third_party
test-lite:
$(DOCKER_COMPOSE_COMMAND_TASK_RUNNER_LITE) run --build --rm task-runner-lite \
pytest -q
style: format lint-fix