This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Optimum TPU / Test TGI on TPU / Integration Tests | |
on: | |
push: | |
schedule: | |
- cron: '0 4 * * *' # run at 4 AM UTC | |
# This can be used to allow manually triggering nightlies from the web interface | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
integration-tests: | |
name: Run TGI Integration Tests | |
runs-on: | |
group: gcp-ct5lp-hightpu-8t | |
env: | |
PJRT_DEVICE: TPU | |
HF_HUB_CACHE: /mnt/hf_cache/cache_huggingface | |
HF_TOKEN: ${{ secrets.HF_TOKEN_OPTIMUM_TPU_CI }} | |
V5_LITEPOD_8_ENV: ${{ vars.V5_LITEPOD_8_ENV}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Python | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y python3 python3-pip | |
sudo ln -s /usr/bin/python3 /usr/bin/python | |
# We cannot use make tpu-tgi here because we need to build the docker image with the network host option | |
- name: Build TGI Docker Image | |
run: | | |
docker build --rm -f text-generation-inference/docker/Dockerfile \ | |
--build-arg VERSION=$(VERSION) \ | |
--build-arg TGI_VERSION=$(TGI_VERSION) \ | |
--ulimit nofile=100000:100000 \ | |
--network host \ | |
-t huggingface/optimum-tpu:$(VERSION)-tgi . | |
docker tag huggingface/optimum-tpu:$(VERSION)-tgi huggingface/optimum-tpu:latest | |
- name: Run integration tests | |
run: | | |
make tgi_docker_test |