Skip to content

Commit

Permalink
[CI/Build] Add run-hpu-test.sh script (vllm-project#10167)
Browse files Browse the repository at this point in the history
Signed-off-by: Chendi.Xue <[email protected]>
Signed-off-by: Sumit Dubey <[email protected]>
  • Loading branch information
xuechendi authored and sumitd2 committed Nov 14, 2024
1 parent a5aa345 commit de25b3a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .buildkite/run-hpu-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# This script build the CPU docker image and run the offline inference inside the container.
# It serves a sanity check for compilation and basic model usage.
set -ex

# Try building the docker image
docker build -t hpu-test-env -f Dockerfile.hpu .

# Setup cleanup
remove_docker_container() { docker rm -f hpu-test || true; }
trap remove_docker_container EXIT
remove_docker_container

# Run the image and launch offline inference
docker run --runtime=habana --name=hpu-test --network=host -e VLLM_SKIP_WARMUP=true --entrypoint="" hpu-test-env python3 examples/offline_inference.py
2 changes: 2 additions & 0 deletions Dockerfile.hpu
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ RUN VLLM_TARGET_DEVICE=hpu python3 setup.py install

WORKDIR /workspace/

RUN ln -s /workspace/vllm/tests && ln -s /workspace/vllm/examples && ln -s /workspace/vllm/benchmarks

ENTRYPOINT ["python3", "-m", "vllm.entrypoints.openai.api_server"]

0 comments on commit de25b3a

Please sign in to comment.