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 a7af4f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test-pytorch-xla-tpu-tgi-integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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
Expand Down Expand Up @@ -32,9 +33,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 a7af4f1

Please sign in to comment.