Skip to content

Commit 858f5a3

Browse files
authored
[CI] Removed six, updated absl_py (tensorflow#3203)
* Removed ci/install_qemu.sh * Removed six from direct deps * Removed six from tflm-ci docker * Use requirement(absl_py) * New qemu-user
1 parent fe33d76 commit 858f5a3

File tree

24 files changed

+1051
-1023
lines changed

24 files changed

+1051
-1023
lines changed

.github/workflows/check_tflite_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "${PR_FILES}" >> tmp_pull_request_files.txt
3535
rm -rf .git
3636
echo ${{ secrets.tflm-bot-token }} | docker login ghcr.io -u tflm-bot --password-stdin
37-
docker run --rm -v `pwd`:/tflite-micro -w /tflite-micro ghcr.io/tflm-bot/tflm-ci:0.6.4 python3 ci/check_tflite_files.py tmp_pull_request_files.txt
37+
docker run --rm -v `pwd`:/tflite-micro -w /tflite-micro ghcr.io/tflm-bot/tflm-ci:0.6.5 python3 ci/check_tflite_files.py tmp_pull_request_files.txt
3838
TFLITE_FILE_TEST_STATUS=$?
3939
rm -f tmp_pull_request_files.txt
4040
exit ${TFLITE_FILE_TEST_STATUS}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ jobs:
262262
with:
263263
ref: ${{ inputs.trigger-sha }}
264264
- name: Test
265-
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
265+
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
266266
with:
267267
args: /bin/sh -c tensorflow/lite/micro/tools/ci_build/test_cortex_m_qemu.sh tflite-micro/
268268

@@ -278,7 +278,7 @@ jobs:
278278
with:
279279
ref: ${{ inputs.trigger-sha }}
280280
- name: Check
281-
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
281+
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
282282
with:
283283
args: /bin/sh -c "git config --global --add safe.directory /github/workspace && tensorflow/lite/micro/tools/ci_build/test_code_style.sh"
284284

.github/workflows/riscv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
python-version: '3.10'
2525
- uses: actions/checkout@v3
2626
- name: Test
27-
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
27+
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
2828
with:
2929
args: /bin/sh -c tensorflow/lite/micro/tools/ci_build/test_riscv.sh
3030

.github/workflows/riscv_postmerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ jobs:
3232
with:
3333
ref: ${{ inputs.trigger-sha }}
3434
- name: Test
35-
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.4
35+
uses: docker://ghcr.io/tflm-bot/tflm-ci:0.6.5
3636
with:
3737
args: /bin/sh -c tensorflow/lite/micro/tools/ci_build/test_riscv.sh

ci/Dockerfile.micro

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#
1616
# --- Build and upload to GHCR.IO ---
1717
# (Run from the root of the TFLM repository)
18-
# export TFLM_CI_VERSION=0.6.4
19-
# docker build -f ci/Dockerfile.micro -t ghcr.io/tflm-bot/tflm-ci:$TFLM_CI_VERSION .
18+
# export TFLM_CI_VERSION=0.6.5
19+
# docker build --no-cache -f ci/Dockerfile.micro -t ghcr.io/tflm-bot/tflm-ci:$TFLM_CI_VERSION .
2020
# docker push ghcr.io/tflm-bot/tflm-ci:$TFLM_CI_VERSION
2121
#
2222
# --- Run locally for debugging ---
@@ -28,11 +28,17 @@
2828
# Use a prebuilt Python image to speed up the build process.
2929
FROM python:3.10-bookworm
3030

31+
# Install qemu-user from bookworm-backports to address a known bug:
32+
# https://gitlab.com/qemu-project/qemu/-/issues/1697
33+
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list && \
34+
apt-get update && \
35+
apt-get install -y --no-install-recommends -t bookworm-backports qemu-user && \
36+
rm -rf /var/lib/apt/lists/*
37+
3138
# Install all required system dependencies
3239
RUN apt-get update && apt-get install -y \
3340
gnupg \
3441
lsb-release \
35-
qemu-system-arm \
3642
software-properties-common \
3743
sudo \
3844
wget \
@@ -56,7 +62,7 @@ RUN wget https://apt.llvm.org/llvm.sh \
5662
# Install all Python dependencies
5763
# - yapf to check for Python formatting
5864
# - Pillow was added first for the C array generation
59-
# - pandas, matplotlib, and six for create_size_log scripts
65+
# - pandas, and matplotlib for create_size_log scripts
6066
# - pyyaml, requests, psutil, and robotframework for Renode test
6167
RUN pip install --no-cache-dir --upgrade pip && \
6268
pip install --no-cache-dir \
@@ -67,7 +73,6 @@ RUN pip install --no-cache-dir --upgrade pip && \
6773
pyyaml \
6874
requests \
6975
robotframework==4.0.1 \
70-
six \
7176
yapf==0.40.2
7277

7378
# Copy and run install scripts, then clean them up

ci/install_qemu.sh

Lines changed: 0 additions & 40 deletions
This file was deleted.

codegen/BUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ py_binary(
6363
":graph",
6464
":inference_generator",
6565
"//tensorflow/lite/tools:flatbuffer_utils",
66-
"@absl_py//absl:app",
67-
"@absl_py//absl/flags",
66+
requirement("absl_py"),
6867
],
6968
)

python/tflite_micro/signal/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ py_test(
231231
],
232232
deps = [
233233
":overlap_add_op",
234-
"@absl_py//absl/testing:parameterized",
234+
requirement("absl_py"),
235235
requirement("numpy"),
236236
requirement("tensorflow"),
237237
],

tensorflow/lite/micro/compression/BUILD

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ py_library(
118118
":model_facade",
119119
":spec",
120120
"//tensorflow/lite/micro/tools:tflite_flatbuffer_align",
121-
"@absl_py//absl:app",
122-
"@absl_py//absl/flags",
121+
requirement("absl_py"),
123122
"@flatbuffers//:runtime_py",
124123
requirement("bitarray"),
125124
requirement("numpy"),
@@ -246,7 +245,7 @@ py_binary(
246245
deps = [
247246
":metadata_py",
248247
"//tensorflow/lite/python:schema_py",
249-
"@absl_py//absl:app",
248+
requirement("absl_py"),
250249
requirement("bitarray"),
251250
requirement("prettyprinter"),
252251
],

tensorflow/lite/micro/compression/view_tests.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("@rules_python//python:defs.bzl", "py_test")
2+
load("@tflm_pip_deps//:requirements.bzl", "requirement")
23

34
def generate_view_tests(targets):
45
"""Generates py_test targets for each target's path and a test_suite to
@@ -20,7 +21,7 @@ def generate_view_tests(targets):
2021
data = [target],
2122
deps = [
2223
":view",
23-
"@absl_py//absl/testing:absltest",
24+
requirement("absl_py"),
2425
],
2526
size = "small",
2627
)

0 commit comments

Comments
 (0)