File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ setup_environment() {
1818 # shellcheck disable=1091
1919 source /etc/environment
2020
21+ if [ -z " ${BUILDKITE_COMMIT:- } " ]; then
22+ echo " ERROR: BUILDKITE_COMMIT environment variable is not set." >&2
23+ echo " This script expects BUILDKITE_COMMIT to tag the Docker image." >&2
24+ exit 1
25+ fi
26+
2127 # Cleanup of existing containers and images.
2228 echo " Starting cleanup for ${IMAGE_NAME} ..."
2329 # Get all unique image IDs for the repository
@@ -49,20 +55,10 @@ setup_environment() {
4955
5056 echo " Cleanup complete."
5157
52- echo " Installing Python dependencies"
53- python3 -m pip install --progress-bar off buildkite-test-collector==0.1.9
54- echo " Python dependencies installed"
55- if [ -z " ${BUILDKITE:- } " ]; then
56- VLLM_COMMIT_HASH=" "
57- TPU_INFERENCE_HASH=$( git log -n 1 --pretty=" %H" )
58- else
59- VLLM_COMMIT_HASH=$( buildkite-agent meta-data get " VLLM_COMMIT_HASH" --default " " )
60- TPU_INFERENCE_HASH=" $BUILDKITE_COMMIT "
61- fi
58+ VLLM_COMMIT_HASH=$( buildkite-agent meta-data get " VLLM_COMMIT_HASH" --default " " )
6259
6360 docker build \
6461 --build-arg VLLM_COMMIT_HASH=" ${VLLM_COMMIT_HASH} " \
6562 --build-arg IS_FOR_V7X=" ${IS_FOR_V7X:- false} " \
66- --no-cache -f docker/Dockerfile -t " ${IMAGE_NAME} :${TPU_INFERENCE_HASH} " .
67-
63+ --no-cache -f docker/Dockerfile -t " ${IMAGE_NAME} :${BUILDKITE_COMMIT} " .
6864}
You can’t perform that action at this time.
0 commit comments