Skip to content

debug - without container #6

debug - without container

debug - without container #6

Workflow file for this run

name: Optimum TPU / Test TGI on TPU
on:
push:
branches: [ main, enable-ci-cd ]
paths:
- "text-generation-inference/**"
- ".github/**"
pull_request:
branches: [ main ]
paths:
- "text-generation-inference/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
do-the-job:
name: Run TGI tests
runs-on: optimum-tpu
env:
PJRT_DEVICE: TPU
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create venv and install Pytorch/XLA
run: |
echo "PJRT_DEVICE set to $PJRT_DEVICE"
ls /home
cat /etc/issue
sudo apt install python3.10-venv -y
echo "Creating virtual environment..."
python3 -m venv venv-tpu-pytorch
source venv-tpu-pytorch/bin/activate
echo "Installing basic packages"
python -m pip install -U pip
python -m pip install "torch~=2.2.0" "torch_xla[tpu]~=2.2.0" -f https://storage.googleapis.com/libtpu-releases/index.html numpy
echo "Testing XLA installation..."
python -c "import torch_xla.core.xla_model as xm; assert xm.xla_device().type == 'xla', 'XLA device not available'"
- name: Run TGI server python tests
run: |
source venv-tpu-pytorch/bin/activate
make tgi_test