Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Add integration test to the CI #140

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test-pytorch-xla-tpu-tgi-integration.yml
Original file line number Diff line number Diff line change
@@ -32,9 +32,10 @@ jobs:
sudo apt-get install -y python3 python3-pip
sudo ln -s /usr/bin/python3 /usr/bin/python

# To build the docker image in the ci, we need to use the network host option
- name: Build TGI Docker Image
run: |
make tpu-tgi
make tpu-tgi NETWORK=host

- name: Run integration tests
run: |
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -42,11 +42,14 @@ clean:
rm -rf dist deps
make -C text-generation-inference/server/ clean

# normal usage: make tpu-tgi
# ci usage: make tpu-tgi NETWORK=host, to build the docker image with the network host option
tpu-tgi:
docker build --rm -f text-generation-inference/docker/Dockerfile \
--build-arg VERSION=$(VERSION) \
--build-arg TGI_VERSION=$(TGI_VERSION) \
--ulimit nofile=100000:100000 \
$(if $(NETWORK),--network $(NETWORK),) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need the network hot at this step?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for the CI. If you build with the default network, some requests during the build process are blocked. For example, the protobuf installation fails.

-t huggingface/optimum-tpu:$(VERSION)-tgi .
docker tag huggingface/optimum-tpu:$(VERSION)-tgi huggingface/optimum-tpu:latest

Loading