[CI/Build][TPU] Add TPU CI test (#6277)

Co-authored-by: kevin <kevin@anyscale.com>
This commit is contained in:
Woosuk Kwon
2024-07-15 14:31:16 -07:00
committed by GitHub
parent ec9933f4a5
commit 4552e37b55
3 changed files with 44 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
set -e
# Build the docker image.
docker build -f Dockerfile.tpu -t vllm-tpu .
# Set up cleanup.
remove_docker_container() { docker rm -f tpu-test || true; }
trap remove_docker_container EXIT
# Remove the container that might not be cleaned up in the previous run.
remove_docker_container
# For HF_TOKEN.
source /etc/environment
# Run a simple end-to-end example.
docker run --privileged --net host --shm-size=16G -it -e HF_TOKEN=$HF_TOKEN --name tpu-test vllm-tpu \
python3 /workspace/vllm/examples/offline_inference_tpu.py