-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·91 lines (75 loc) · 2.11 KB
/
Makefile
File metadata and controls
executable file
·91 lines (75 loc) · 2.11 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
89
90
91
IMAGE_NAME=yolov8-custom:gpu-py3.10.11
IMAGE_NAME_v2=yolov11-binsho:py3.12
# ClearML Agent variables
TASK_ID ?=
QUEUE ?= default
run:
PYTHONPATH=. uv run src/train.py
run-docker:
docker run \
--ipc=host \
-it --rm --gpus all \
-v ${PWD}:/workspace \
-u $(id -u):$(id -g) \
-e PYTHONPATH=/workspace \
-w /workspace \
-v ${PWD}/clearml.conf:/root/clearml.conf \
$(IMAGE_NAME) \
bash
run-docker-v2:
docker run \
--ipc=host \
-it --rm --gpus all \
-v ~/clearml.conf:/root/clearml.conf \
-v ${PWD}:/workspace \
-w /workspace \
-e PYTHONPATH=/workspace \
$(IMAGE_NAME_v2) \
bash
build:
docker build -t $(IMAGE_NAME) .
build-v2:
DOCKER_BUILDKIT=1 docker build \
-f Dockerfile.v2 \
-t $(IMAGE_NAME_v2) .
test_code:
pytest tests -v
get-req:
uv export \
--format requirements.txt \
--resolution lowest-direct \
--no-hashes \
-o requirements.txt
# =============================================================================
# ClearML Agent Targets
# =============================================================================
# Start ClearML Agent daemon in Docker mode (uses pre-built image)
# Usage: make agent-daemon
# Usage: make agent-daemon QUEUE=gpu-queue
agent-daemon:
clearml-agent daemon --queue $(QUEUE) --docker $(IMAGE_NAME_v2) --gpus all
# Start ClearML Agent daemon in uv mode (no Docker, uses local Python/uv)
# Usage: make agent-daemon-uv
# Usage: make agent-daemon-uv QUEUE=cpu-queue
agent-daemon-uv:
clearml-agent daemon --queue $(QUEUE)
# Execute a specific task locally (for debugging)
# Usage: make agent-execute TASK_ID=abc123
agent-execute:
ifndef TASK_ID
$(error TASK_ID is required. Usage: make agent-execute TASK_ID=your_task_id)
endif
clearml-agent execute --id $(TASK_ID) --docker $(IMAGE_NAME_v2)
# Execute a specific task locally without Docker (uv mode)
# Usage: make agent-execute-uv TASK_ID=abc123
agent-execute-uv:
ifndef TASK_ID
$(error TASK_ID is required. Usage: make agent-execute-uv TASK_ID=your_task_id)
endif
clearml-agent execute --id $(TASK_ID)
# List running ClearML agents
agent-list:
clearml-agent list
# Show agent daemon help
agent-help:
clearml-agent daemon --help