Skip to content

Commit ea4f1bb

Browse files
committed
ci: use a single environment for CUDA all images
1 parent 9011736 commit ea4f1bb

28 files changed

Lines changed: 145 additions & 1021 deletions

.github/configs/ascend.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ image_build:
4242
target: dev
4343
network: host
4444
max_parallel: 1
45-
runtime_device_count: '2'
46-
runtime_smoke_nproc: '2'
4745
registry_login: true
4846
validation_script: tools/install/ascend/validate_image_build.sh
4947
tasks:
@@ -66,30 +64,6 @@ image_build:
6664
source_refs:
6765
VLLM_PLUGIN_FL_REF: vllm_plugin_fl
6866
FLAGGEMS_REF: flaggems
69-
all:
70-
dockerfile: docker/ascend/Dockerfile.all
71-
image: flagos-dev/flagscale-all
72-
test_roles: [train, inference]
73-
base_image: harbor.baai.ac.cn/flagos-dev/flagscale:manual-20260812-ascend-dev-inference
74-
build_args:
75-
TRAIN_BASE_IMAGE: harbor.baai.ac.cn/flagos-dev/flagscale:manual-20260812-ascend-dev-train
76-
INFERENCE_BASE_IMAGE: harbor.baai.ac.cn/flagos-dev/flagscale:manual-20260812-ascend-dev-inference
77-
source_refs:
78-
FLAGSCALE_TE_REF: transformer_engine_fl
79-
FLAGSCALE_MEGATRON_REF: megatron_lm_fl
80-
VLLM_PLUGIN_FL_REF: vllm_plugin_fl
81-
FLAGGEMS_REF: flaggems
82-
test_environments:
83-
train:
84-
pkg_mgr: runtime
85-
env_path: /opt/flagscale/runtimes/train
86-
inference:
87-
pkg_mgr: runtime
88-
env_path: /opt/flagscale/runtimes/inference
89-
serve:
90-
pkg_mgr: runtime
91-
env_path: /opt/flagscale/runtimes/serve
92-
9367
# Container options for Ascend NPU (no --gpus, use --device for NPU cards)
9468
container_options: >-
9569
--device /dev/davinci_manager

.github/configs/cuda.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,17 @@ image_build:
7272
test_roles: [train, inference]
7373
test_environments:
7474
train:
75-
pkg_mgr: runtime
76-
env_path: /opt/flagscale/runtimes/train
75+
pkg_mgr: conda
76+
env_name: flagscale-all
77+
env_path: /opt/flagscale/miniconda3
7778
inference:
78-
pkg_mgr: runtime
79-
env_path: /opt/flagscale/runtimes/inference
79+
pkg_mgr: conda
80+
env_name: flagscale-all
81+
env_path: /opt/flagscale/miniconda3
8082
serve:
81-
pkg_mgr: runtime
82-
env_path: /opt/flagscale/runtimes/serve
83+
pkg_mgr: conda
84+
env_name: flagscale-all
85+
env_path: /opt/flagscale/miniconda3
8386
build_args:
8487
CUDA_VERSION: '12.8.1'
8588
UBUNTU_VERSION: '22.04'

.github/configs/metax.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,6 @@ image_build:
6363
base_image: harbor.baai.ac.cn/flagos-dev/vllm-plugin-fl:v0.20.2-metax-ci
6464
source_refs:
6565
VLLM_PLUGIN_FL_REF: vllm_plugin_fl
66-
all:
67-
dockerfile: docker/metax/Dockerfile.all
68-
image: flagos-dev/flagscale-all
69-
test_roles: [train, inference]
70-
base_image: harbor.baai.ac.cn/flagos-dev/flagscale-inference:86c8e54-metax-dev
71-
build_args:
72-
TRAIN_BASE_IMAGE: harbor.baai.ac.cn/flagos-dev/flagscale:0a6cc4b-metax-train-dev
73-
INFERENCE_BASE_IMAGE: harbor.baai.ac.cn/flagos-dev/flagscale-inference:86c8e54-metax-dev
74-
source_refs:
75-
FLAGSCALE_MEGATRON_REF: megatron_lm_fl
76-
FLAGSCALE_TE_REF: transformer_engine_fl
77-
VLLM_PLUGIN_FL_REF: vllm_plugin_fl
78-
test_environments:
79-
train:
80-
pkg_mgr: runtime
81-
env_path: /opt/flagscale/runtimes/train
82-
inference:
83-
pkg_mgr: runtime
84-
env_path: /opt/flagscale/runtimes/inference
85-
serve:
86-
pkg_mgr: runtime
87-
env_path: /opt/flagscale/runtimes/serve
88-
8966
# Container options for MetaX C550 (MACA runtime)
9067
container_options: >-
9168
--hostname=flagscale-ci

.github/configs/musa.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
hardware_name: musa
1919
display_name: "MThreads MUSA Tests"
2020

21-
# Latest train/inference/all images validated end-to-end on S5000.
22-
# Keep all tasks on the same FlagScale revision so common tests use a
23-
# consistent software stack without rebuilding images for every PR.
24-
ci_image: harbor.baai.ac.cn/flagscale/flagscale-all:dev-musa-s5000-py3.10-8aa5314e94bc
21+
# Latest train/inference images validated end-to-end on S5000.
22+
# The platform currently does not publish an all-in-one image.
23+
ci_image: harbor.baai.ac.cn/flagscale/flagscale-train:dev-musa-s5000-py3.10-8aa5314e94bc
2524
ci_train_image: harbor.baai.ac.cn/flagscale/flagscale-train:dev-musa-s5000-py3.10-8aa5314e94bc
2625
ci_inference_image: harbor.baai.ac.cn/flagscale/flagscale-inference:dev-musa-s5000-py3.10-8aa5314e94bc
2726

@@ -63,30 +62,6 @@ image_build:
6362
PKG_MGR: pip
6463
PIP_INDEX_URL: https://pypi.org/simple
6564
PIP_DEFAULT_TIMEOUT: '300'
66-
all:
67-
dockerfile: docker/musa/Dockerfile.all
68-
image: flagos-dev/flagscale-all
69-
base_image: harbor.baai.ac.cn/flagos-dev/transformerengine-fl:manual-20260802-musa-torch2.7.1-e73781e-vllm29ceebd
70-
runtime_smoke_nproc: '2'
71-
test_roles: [train, inference]
72-
test_environments:
73-
train:
74-
pkg_mgr: runtime
75-
env_path: /opt/flagscale/runtimes/train
76-
inference:
77-
pkg_mgr: runtime
78-
env_path: /opt/flagscale/runtimes/inference
79-
serve:
80-
pkg_mgr: runtime
81-
env_path: /opt/flagscale/runtimes/serve
82-
build_args:
83-
PKG_MGR: pip
84-
PIP_INDEX_URL: https://pypi.org/simple
85-
PIP_DEFAULT_TIMEOUT: '300'
86-
FLAGSCALE_TE_VERSION: 2.0.0+e73781e
87-
source_refs:
88-
FLAGSCALE_MEGATRON_REF: megatron_lm_fl
89-
9065
# Container volumes (hardware-specific paths)
9166
container_volumes:
9267
- /mnt/airs-business/cicd/baai_datasets:/home/gitlab-runner/data

.github/workflows/all_tests_common.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ on:
4545
required: false
4646
type: string
4747
default: ""
48+
train_env_name:
49+
required: false
50+
type: string
51+
default: ""
4852
train_env_path:
4953
required: false
5054
type: string
@@ -53,6 +57,10 @@ on:
5357
required: false
5458
type: string
5559
default: ""
60+
inference_env_name:
61+
required: false
62+
type: string
63+
default: ""
5664
inference_env_path:
5765
required: false
5866
type: string
@@ -61,6 +69,10 @@ on:
6169
required: false
6270
type: string
6371
default: ""
72+
serve_env_name:
73+
required: false
74+
type: string
75+
default: ""
6476
serve_env_path:
6577
required: false
6678
type: string
@@ -190,18 +202,27 @@ jobs:
190202
if [ -n "${{ inputs.train_pkg_mgr }}" ]; then
191203
echo "pkg_mgr_train=${{ inputs.train_pkg_mgr }}" >> "$GITHUB_OUTPUT"
192204
fi
205+
if [ -n "${{ inputs.train_env_name }}" ]; then
206+
echo "env_name_train=${{ inputs.train_env_name }}" >> "$GITHUB_OUTPUT"
207+
fi
193208
if [ -n "${{ inputs.train_env_path }}" ]; then
194209
echo "env_path_train=${{ inputs.train_env_path }}" >> "$GITHUB_OUTPUT"
195210
fi
196211
if [ -n "${{ inputs.inference_pkg_mgr }}" ]; then
197212
echo "pkg_mgr_inference=${{ inputs.inference_pkg_mgr }}" >> "$GITHUB_OUTPUT"
198213
fi
214+
if [ -n "${{ inputs.inference_env_name }}" ]; then
215+
echo "env_name_inference=${{ inputs.inference_env_name }}" >> "$GITHUB_OUTPUT"
216+
fi
199217
if [ -n "${{ inputs.inference_env_path }}" ]; then
200218
echo "env_path_inference=${{ inputs.inference_env_path }}" >> "$GITHUB_OUTPUT"
201219
fi
202220
if [ -n "${{ inputs.serve_pkg_mgr }}" ]; then
203221
echo "pkg_mgr_serve=${{ inputs.serve_pkg_mgr }}" >> "$GITHUB_OUTPUT"
204222
fi
223+
if [ -n "${{ inputs.serve_env_name }}" ]; then
224+
echo "env_name_serve=${{ inputs.serve_env_name }}" >> "$GITHUB_OUTPUT"
225+
fi
205226
if [ -n "${{ inputs.serve_env_path }}" ]; then
206227
echo "env_path_serve=${{ inputs.serve_env_path }}" >> "$GITHUB_OUTPUT"
207228
fi

.github/workflows/build_image_common.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,13 @@ jobs:
7272
train_image: ${{ steps.contract.outputs.train_image }}
7373
inference_image: ${{ steps.contract.outputs.inference_image }}
7474
train_pkg_mgr: ${{ steps.contract.outputs.train_pkg_mgr }}
75+
train_env_name: ${{ steps.contract.outputs.train_env_name }}
7576
train_env_path: ${{ steps.contract.outputs.train_env_path }}
7677
inference_pkg_mgr: ${{ steps.contract.outputs.inference_pkg_mgr }}
78+
inference_env_name: ${{ steps.contract.outputs.inference_env_name }}
7779
inference_env_path: ${{ steps.contract.outputs.inference_env_path }}
7880
serve_pkg_mgr: ${{ steps.contract.outputs.serve_pkg_mgr }}
81+
serve_env_name: ${{ steps.contract.outputs.serve_env_name }}
7982
serve_env_path: ${{ steps.contract.outputs.serve_env_path }}
8083
steps:
8184
- name: Checkout source
@@ -169,10 +172,13 @@ jobs:
169172
inference_image=$(/usr/local/bin/yq -r \
170173
'.ci_inference_image // .ci_image // ""' "$config_file")
171174
train_pkg_mgr=""
175+
train_env_name=""
172176
train_env_path=""
173177
inference_pkg_mgr=""
178+
inference_env_name=""
174179
inference_env_path=""
175180
serve_pkg_mgr=""
181+
serve_env_name=""
176182
serve_env_path=""
177183
178184
for raw_task in "${task_names[@]}"; do
@@ -265,15 +271,36 @@ jobs:
265271
if jq -e 'index("inference") != null' <<< "$test_roles" >/dev/null; then
266272
required_roles+=(inference serve)
267273
fi
274+
reference_role="${required_roles[0]}"
268275
for role in "${required_roles[@]}"; do
269276
pkg_mgr=$(jq -r --arg role "$role" \
270277
'.test_environments[$role].pkg_mgr // ""' <<< "$entry")
278+
env_name=$(jq -r --arg role "$role" \
279+
'.test_environments[$role].env_name // ""' <<< "$entry")
271280
env_path=$(jq -r --arg role "$role" \
272281
'.test_environments[$role].env_path // ""' <<< "$entry")
273282
if [ -z "$pkg_mgr" ] || [ -z "$env_path" ]; then
274283
echo "::error::Missing test_environments.${role} for ${PLATFORM}/${task}"
275284
exit 1
276285
fi
286+
case "$pkg_mgr" in
287+
conda|pip|uv) ;;
288+
*)
289+
echo "::error::Unsupported test environment package manager: ${PLATFORM}/${task}/${role}: $pkg_mgr"
290+
exit 1
291+
;;
292+
esac
293+
if [ "$pkg_mgr" = conda ] && [ -z "$env_name" ]; then
294+
echo "::error::Missing test_environments.${role}.env_name for ${PLATFORM}/${task}"
295+
exit 1
296+
fi
297+
if ! jq -e --arg role "$role" \
298+
--arg reference_role "$reference_role" \
299+
'.test_environments[$role] == .test_environments[$reference_role]' \
300+
<<< "$entry" >/dev/null; then
301+
echo "::error::All image test roles must share one environment: ${PLATFORM}/${task}"
302+
exit 1
303+
fi
277304
done
278305
fi
279306
@@ -345,6 +372,7 @@ jobs:
345372
if [ "$all_task_selected" != true ] || [ "$task" = all ]; then
346373
train_image="$candidate"
347374
train_pkg_mgr=$(jq -r '.test_environments.train.pkg_mgr // ""' <<< "$entry")
375+
train_env_name=$(jq -r '.test_environments.train.env_name // ""' <<< "$entry")
348376
train_env_path=$(jq -r '.test_environments.train.env_path // ""' <<< "$entry")
349377
fi
350378
candidate_test_roles=$((candidate_test_roles + 1))
@@ -353,8 +381,10 @@ jobs:
353381
if [ "$all_task_selected" != true ] || [ "$task" = all ]; then
354382
inference_image="$candidate"
355383
inference_pkg_mgr=$(jq -r '.test_environments.inference.pkg_mgr // ""' <<< "$entry")
384+
inference_env_name=$(jq -r '.test_environments.inference.env_name // ""' <<< "$entry")
356385
inference_env_path=$(jq -r '.test_environments.inference.env_path // ""' <<< "$entry")
357386
serve_pkg_mgr=$(jq -r '.test_environments.serve.pkg_mgr // ""' <<< "$entry")
387+
serve_env_name=$(jq -r '.test_environments.serve.env_name // ""' <<< "$entry")
358388
serve_env_path=$(jq -r '.test_environments.serve.env_path // ""' <<< "$entry")
359389
fi
360390
candidate_test_roles=$((candidate_test_roles + 1))
@@ -381,10 +411,13 @@ jobs:
381411
echo "train_image=$train_image"
382412
echo "inference_image=$inference_image"
383413
echo "train_pkg_mgr=$train_pkg_mgr"
414+
echo "train_env_name=$train_env_name"
384415
echo "train_env_path=$train_env_path"
385416
echo "inference_pkg_mgr=$inference_pkg_mgr"
417+
echo "inference_env_name=$inference_env_name"
386418
echo "inference_env_path=$inference_env_path"
387419
echo "serve_pkg_mgr=$serve_pkg_mgr"
420+
echo "serve_env_name=$serve_env_name"
388421
echo "serve_env_path=$serve_env_path"
389422
} >> "$GITHUB_OUTPUT"
390423
@@ -622,8 +655,11 @@ jobs:
622655
ci_train_image: ${{ needs.configure.outputs.train_image }}
623656
ci_inference_image: ${{ needs.configure.outputs.inference_image }}
624657
train_pkg_mgr: ${{ needs.configure.outputs.train_pkg_mgr }}
658+
train_env_name: ${{ needs.configure.outputs.train_env_name }}
625659
train_env_path: ${{ needs.configure.outputs.train_env_path }}
626660
inference_pkg_mgr: ${{ needs.configure.outputs.inference_pkg_mgr }}
661+
inference_env_name: ${{ needs.configure.outputs.inference_env_name }}
627662
inference_env_path: ${{ needs.configure.outputs.inference_env_path }}
628663
serve_pkg_mgr: ${{ needs.configure.outputs.serve_pkg_mgr }}
664+
serve_env_name: ${{ needs.configure.outputs.serve_env_name }}
629665
serve_env_path: ${{ needs.configure.outputs.serve_env_path }}

.github/workflows/functional_tests_benchmark.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ jobs:
192192
activate_uv_env "$ENV_PATH" || echo "UV activation failed"
193193
fi
194194
;;
195-
runtime)
196-
activate_runtime_env "$ENV_PATH" || { echo "Runtime activation failed"; exit 1; }
197-
;;
198195
pip)
199196
echo "Running tests with pip/system Python"
200197
;;
@@ -256,9 +253,6 @@ jobs:
256253
activate_uv_env "$ENV_PATH" || { echo "UV activation failed"; exit 1; }
257254
fi
258255
;;
259-
runtime)
260-
activate_runtime_env "$ENV_PATH" || { echo "Runtime activation failed"; exit 1; }
261-
;;
262256
pip)
263257
echo "Using system Python with pip"
264258
;;

.github/workflows/functional_tests_cli.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ jobs:
159159
activate_uv_env "$ENV_PATH" || { echo "❌ UV activation failed"; exit 1; }
160160
fi
161161
;;
162-
runtime)
163-
activate_runtime_env "$ENV_PATH" || { echo "Runtime activation failed"; exit 1; }
164-
;;
165162
pip)
166163
echo "Using system Python with pip"
167164
;;
@@ -204,9 +201,6 @@ jobs:
204201
activate_uv_env "$ENV_PATH" || { echo "❌ UV activation failed"; exit 1; }
205202
fi
206203
;;
207-
runtime)
208-
activate_runtime_env "$ENV_PATH" || { echo "Runtime activation failed"; exit 1; }
209-
;;
210204
pip)
211205
echo "Using system Python with pip"
212206
;;

.github/workflows/functional_tests_hetero_train.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ jobs:
192192
activate_uv_env "$ENV_PATH" || echo "⚠️ UV activation failed"
193193
fi
194194
;;
195-
runtime)
196-
activate_runtime_env "$ENV_PATH" || { echo "Runtime activation failed"; exit 1; }
197-
;;
198195
pip)
199196
echo "ℹ️ Running tests with pip/system Python"
200197
;;

.github/workflows/functional_tests_inference.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ jobs:
167167
activate_uv_env "$ENV_PATH"
168168
fi
169169
;;
170-
runtime)
171-
activate_runtime_env "$ENV_PATH"
172-
;;
173170
pip)
174171
;;
175172
*)
@@ -225,9 +222,6 @@ jobs:
225222
activate_uv_env "$ENV_PATH" || echo "⚠️ UV activation failed"
226223
fi
227224
;;
228-
runtime)
229-
activate_runtime_env "$ENV_PATH" || { echo "Runtime activation failed"; exit 1; }
230-
;;
231225
pip)
232226
echo "ℹ️ Running tests with pip/system Python"
233227
PLATFORM_ENV_SCRIPT="./tools/install/$PLATFORM/env.sh"

0 commit comments

Comments
 (0)