-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (53 loc) · 2.38 KB
/
Copy pathMakefile
File metadata and controls
65 lines (53 loc) · 2.38 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
# Copyright (c) 2026 SPHARX . All Rights Reserved.
# From data intelligence emerges.
# 始于数据,终于智能。
# ============================================================================
# deepness 生产线 Makefile
# 目标:自动化构建所有 Docker 镜像,自动检查并下载依赖
# 用法:
# make all # 构建所有(默认)
# make deps # 仅下载编译依赖
# make sources # 仅下载模块源码和补丁
# make base # 构建基础镜像
# make physics # 构建 01_physics_injection 镜像
# make interaction # 构建 02_interaction_recording 镜像
# make benchmark # 构建 03_benchmark_export 镜像
# make clean # 删除所有 deepness 镜像
# make clean-all # 删除镜像并清理 Docker 构建缓存
# ============================================================================
.PHONY: all deps sources base physics interaction benchmark clean clean-all
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
# 默认目标
all: deps sources base physics interaction benchmark
@echo "🎉 所有镜像构建完成!"
@docker images --filter=reference='deepness-*' --format="table {{.Repository}}\t{{.Tag}}\t{{.Size}}"
# 下载编译依赖
deps:
@$(ROOT_DIR)/scripts/download/download_deps.sh
# 下载模块源码和补丁
sources:
@$(ROOT_DIR)/scripts/download/download_sources.sh
# 构建基础镜像
base:
@echo "🔨 构建基础镜像 deepness-base ..."
@docker build -t deepness-base -f base/Dockerfile .
# 构建 01_physics_injection
physics: base
@echo "🔨 构建 01_physics_injection 镜像 deepness-physics ..."
@docker build -t deepness-physics -f pipelines/01_physics_injection/Dockerfile .
# 构建 02_interaction_recording
interaction: base
@echo "🔨 构建 02_interaction_recording 镜像 deepness-interaction ..."
@docker build -t deepness-interaction -f pipelines/02_interaction_recording/Dockerfile .
# 构建 03_benchmark_export
benchmark: base
@echo "🔨 构建 03_benchmark_export 镜像 deepness-benchmark ..."
@docker build -t deepness-benchmark -f pipelines/03_benchmark_export/Dockerfile .
# 删除所有 deepness 镜像
clean:
@echo "🧹 删除 deepness 相关镜像..."
@docker images -q --filter='reference=deepness-*' | xargs -r docker rmi -f
# 删除镜像并清理构建缓存
clean-all: clean
@echo "🧹 清理 Docker 构建缓存..."
@docker builder prune -a -f