Skip to content

Commit

Permalink
[ci][build] fix commit id (vllm-project#6420)
Browse files Browse the repository at this point in the history
Co-authored-by: Cyrus Leung <[email protected]>
  • Loading branch information
2 people authored and dtrifiro committed Jul 17, 2024
1 parent f2def67 commit 64d55a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .buildkite/test-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ steps:
command: pytest -v -s test_logits_processor.py

- label: Utils Test
command: pytest -v -s test_utils.py
commands:
- pytest -v -s test_utils.py
- pytest -v -s test_embedded_commit.py

- label: Worker Test
mirror_hardwares: [amd]
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ ENV NVCC_THREADS=$nvcc_threads
# make sure punica kernels are built (for LoRA)
ENV VLLM_INSTALL_PUNICA_KERNELS=1

ARG buildkite_commit
ENV BUILDKITE_COMMIT=${buildkite_commit}

ARG USE_SCCACHE
# if USE_SCCACHE is set, use sccache to speed up compilation
RUN --mount=type=cache,target=/root/.cache/pip \
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ def load_module_from_path(module_name, path):

def embed_commit_hash():
try:
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
encoding="utf-8").strip()
if "BUILDKITE_COMMIT" in os.environ:
# ci build
commit_id = os.environ["BUILDKITE_COMMIT"]
else:
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
encoding="utf-8").strip()

commit_contents = f'__commit__ = "{commit_id}"\n'

version_file = os.path.join(ROOT_DIR, "vllm", "commit_id.py")
Expand Down

0 comments on commit 64d55a6

Please sign in to comment.