Commit 094fc93
authored
Fix container version mismatch by moving build type ARG after FROM (#473)
## Summary
From the log
https://github.com/vllm-project/guidellm/actions/runs/18408284407/job/52453702204#step:5:468
, it can be seen that `GUIDELLM_BUILD_TYPE=$GUIDELLM_BUILD_TYPE` in the
container file was not correctly assigned. The reason is that the `ARG`
instructions defined before `FROM` are global but not available in the
build stage context, which can lead to improper version tagging during
the build process. This caused the container to use an incorrect version
string. Ref to
https://docs.docker.com/reference/dockerfile#understand-how-arg-and-from-interact
## Details
Moved the `ARG GUIDELLM_BUILD_TYPE=dev` instruction and its explanatory
comments after the `FROM $BASE_IMAGE as builder` statement. This ensures
the build type argument is properly scoped to the build stage.
## Test Plan
- In this branch, create a tag such as v0.3.2 and build using `buildah
build --build-arg GUIDELLM_BUILD_TYPE=release`, then check if the logs
return the correct version.
## Related Issues
<!--
Link any relevant issues that this PR addresses.
-->
- Resolves #453
---
- [x] "I certify that all code in this PR is my own, except as noted
below."
## Use of AI
- [ ] Includes AI-assisted code completion
- [ ] Includes code generated by an AI application
- [ ] Includes AI-generated tests (NOTE: AI written tests should have a
docstring that includes `## WRITTEN BY AI ##`)1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments