Skip to content

Commit

Permalink
fix(ci): fix flaky docker build behavior in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistecolle committed Jan 8, 2025
1 parent f0e0181 commit 5187173
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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
Expand Up @@ -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: |
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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),) \
-t huggingface/optimum-tpu:$(VERSION)-tgi .
docker tag huggingface/optimum-tpu:$(VERSION)-tgi huggingface/optimum-tpu:latest

Expand Down

0 comments on commit 5187173

Please sign in to comment.