Skip to content

Commit c87f962

Browse files
authored
ci: add docker-tags.yml to specify the docker image tag used in CI (#1853)
<!-- .github/pull_request_template.md --> ## 📌 Description Followup of #1839 , this PR created a `docker-tags.yml` (placed under `ci/`) file to specify the tag used for each docker image, format: ``` image: tag ``` Each tag is composed of date and git-hash. For public/gitlab CI, we can read from this file to specify the CI docker version. The docker file update and unittest on new container are decoupled, after we upgrade dockerfile, the ci will still be running in earlier tag until we update the `docker-tags.yml`. ## 🔍 Related Issues <!-- Link any related issues here --> ## 🚀 Pull Request Checklist Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete. ### ✅ Pre-commit Checks - [x] I have installed `pre-commit` by running `pip install pre-commit` (or used your preferred method). - [x] I have installed the hooks with `pre-commit install`. - [x] I have run the hooks manually with `pre-commit run --all-files` and fixed any reported issues. > If you are unsure about how to set up `pre-commit`, see [the pre-commit documentation](https://pre-commit.com/). ## 🧪 Tests - [x] Tests have been added or updated as needed. - [x] All tests are passing (`unittest`, etc.). ## Reviewer Notes cc @bkryu @nvmbreughe @yongwww
1 parent 5c7ad5b commit c87f962

File tree

2 files changed

+17
-31
lines changed

2 files changed

+17
-31
lines changed

Jenkinsfile

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@
3737
//
3838

3939
import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
40-
// These are set at runtime from data in ci/jenkins/docker-images.yml, update
41-
// image tags in that file
42-
// Now supports multiple CUDA versions
43-
docker_run_cu126 = "bash ci/bash.sh flashinfer/flashinfer-ci-cu126:latest"
44-
docker_run_cu128 = "bash ci/bash.sh flashinfer/flashinfer-ci-cu128:latest"
45-
docker_run_cu129 = "bash ci/bash.sh flashinfer/flashinfer-ci-cu129:latest"
46-
docker_run_cu130 = "bash ci/bash.sh flashinfer/flashinfer-ci-cu130:latest"
40+
41+
def getDockerRun(cuda_version, dockerTags) {
42+
def image_name = "flashinfer/flashinfer-ci-${cuda_version}"
43+
return "bash ci/bash.sh ${image_name}:${dockerTags[image_name]}"
44+
}
4745

4846
def per_exec_ws(folder) {
4947
return "workspace/exec_${env.EXECUTOR_NUMBER}/" + folder
@@ -181,19 +179,6 @@ def run_with_spot_retry(spot_node_type, on_demand_node_type, test_name, test_clo
181179
def run_unittest_CPU_JIT_CACHE_PACKAGE_BUILD_IMPORT(node_type, cuda_version) {
182180
echo "Running CPU JIT Cache Package Build and Import Unittest with CUDA ${cuda_version}"
183181

184-
def docker_run = ""
185-
if (cuda_version == "cu126") {
186-
docker_run = docker_run_cu126
187-
} else if (cuda_version == "cu128") {
188-
docker_run = docker_run_cu128
189-
} else if (cuda_version == "cu129") {
190-
docker_run = docker_run_cu129
191-
} else if (cuda_version == "cu130") {
192-
docker_run = docker_run_cu130
193-
} else {
194-
error("Unknown CUDA version: ${cuda_version}")
195-
}
196-
197182
if (node_type.contains('SPOT')) {
198183
// Add timeout only for spot instances - node allocation only
199184
def node_allocated = false
@@ -212,6 +197,8 @@ def run_unittest_CPU_JIT_CACHE_PACKAGE_BUILD_IMPORT(node_type, cuda_version) {
212197
node(node_type) {
213198
ws(per_exec_ws('flashinfer-jit-cache')) {
214199
init_git(true)
200+
def dockerTags = readYaml file: 'ci/docker-tags.yml'
201+
def docker_run = getDockerRun(cuda_version, dockerTags)
215202
sh(script: "ls -alh", label: 'Show work directory')
216203
sh(script: "./scripts/task_show_node_info.sh", label: 'Show node info')
217204
sh(script: "${docker_run} --no-gpu ./scripts/task_test_jit_cache_package_build_import.sh", label: 'Test JIT Cache Package Build and Import')
@@ -228,6 +215,8 @@ def run_unittest_CPU_JIT_CACHE_PACKAGE_BUILD_IMPORT(node_type, cuda_version) {
228215
node(node_type) {
229216
ws(per_exec_ws('flashinfer-jit-cache')) {
230217
init_git(true)
218+
def dockerTags = readYaml file: 'ci/docker-tags.yml'
219+
def docker_run = getDockerRun(cuda_version, dockerTags)
231220
sh(script: "ls -alh", label: 'Show work directory')
232221
sh(script: "./scripts/task_show_node_info.sh", label: 'Show node info')
233222
sh(script: "${docker_run} --no-gpu ./scripts/task_test_jit_cache_package_build_import.sh", label: 'Test JIT Cache Package Build and Import')
@@ -239,17 +228,6 @@ def run_unittest_CPU_JIT_CACHE_PACKAGE_BUILD_IMPORT(node_type, cuda_version) {
239228
def shard_run_unittest_GPU(node_type, shard_id, cuda_version) {
240229
echo "Running unittest on ${node_type}, shard ${shard_id}, CUDA ${cuda_version}"
241230

242-
def docker_run = ""
243-
if (cuda_version == "cu126") {
244-
docker_run = docker_run_cu126
245-
} else if (cuda_version == "cu128") {
246-
docker_run = docker_run_cu128
247-
} else if (cuda_version == "cu129") {
248-
docker_run = docker_run_cu129
249-
} else {
250-
error("Unknown CUDA version: ${cuda_version}")
251-
}
252-
253231
if (node_type.contains('SPOT')) {
254232
// Add timeout only for spot instances - node allocation only
255233
def node_allocated = false
@@ -268,6 +246,8 @@ def shard_run_unittest_GPU(node_type, shard_id, cuda_version) {
268246
node(node_type) {
269247
ws(per_exec_ws('flashinfer-unittest')) {
270248
init_git(true) // we need cutlass submodule
249+
def dockerTags = readYaml file: 'ci/docker-tags.yml'
250+
def docker_run = getDockerRun(cuda_version, dockerTags)
271251
sh(script: "ls -alh", label: 'Show work directory')
272252
sh(script: "./scripts/task_show_node_info.sh", label: 'Show node info')
273253
sh(script: "${docker_run} ./scripts/task_jit_run_tests_part${shard_id}.sh", label: 'JIT Unittest Part ${shard_id}')
@@ -284,6 +264,8 @@ def shard_run_unittest_GPU(node_type, shard_id, cuda_version) {
284264
node(node_type) {
285265
ws(per_exec_ws('flashinfer-unittest')) {
286266
init_git(true) // we need cutlass submodule
267+
def dockerTags = readYaml file: 'ci/docker-tags.yml'
268+
def docker_run = getDockerRun(cuda_version, dockerTags)
287269
sh(script: "ls -alh", label: 'Show work directory')
288270
sh(script: "./scripts/task_show_node_info.sh", label: 'Show node info')
289271
sh(script: "${docker_run} ./scripts/task_jit_run_tests_part${shard_id}.sh", label: 'JIT Unittest Part ${shard_id}')

ci/docker-tags.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
flashinfer/flashinfer-ci-cu126: 20251002-52089b5
2+
flashinfer/flashinfer-ci-cu128: 20251002-52089b5
3+
flashinfer/flashinfer-ci-cu129: 20251002-52089b5
4+
flashinfer/flashinfer-ci-cu130: 20251002-52089b5

0 commit comments

Comments
 (0)