Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tengomucho committed Feb 28, 2024
1 parent afcbb62 commit b227869
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/actions/pytorch-xla-tpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apt-get update -y \
libpython3.10 \
gnupg2 \
wget \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN pip3 --no-cache-dir install --upgrade pip
Expand Down
46 changes: 26 additions & 20 deletions .github/workflows/test-pytorch-xla-tpu-tgi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create venv and install Pytorch/XLA
run: |
echo "PJRT_DEVICE set to $PJRT_DEVICE"
pwd
ls
cat /etc/issue
echo "-----"
# 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

- name: Containerized Build and Test TGI
uses: ./.github/actions/pytorch-xla-tpu
with:
make-target: tgi_test

# - name: Create venv and install Pytorch/XLA
# run: |
# echo "PJRT_DEVICE set to $PJRT_DEVICE"
# pwd
# ls
# cat /etc/issue
# echo "-----"
# # 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

0 comments on commit b227869

Please sign in to comment.