From 0ce64bff1d076325000d88fdbef26909a8b158c8 Mon Sep 17 00:00:00 2001 From: Joseph Prince Mathew Date: Wed, 19 Mar 2025 10:43:46 -0400 Subject: [PATCH 1/5] Force docker container to be x86_64 for docker builds --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d1479b8..2e3190c 100644 --- a/Makefile +++ b/Makefile @@ -176,7 +176,7 @@ su $(shell id -u -n) $(if $(1),-c '$(1)',) endef docker-image: - docker build $(DOCKER_IMAGE_OPTIONS) -t $(DOCKER_TAG) \ + docker build --platform linux/amd64 $(DOCKER_IMAGE_OPTIONS) -t $(DOCKER_TAG) \ --build-arg IMAGE=$(DOCKER_IMAGE) $(DOCKER_CONTEXT_DIR) docker-shell: docker-image From 272d029599ed5592e5c295ef362f942dc128b0ea Mon Sep 17 00:00:00 2001 From: Joseph Prince Mathew Date: Wed, 26 Mar 2025 16:50:35 -0400 Subject: [PATCH 2/5] Add Tensorflow 2.17.1 for edgetpu compile; update bazel version --- docker/Dockerfile | 54 +++++++++++++++++++++++------------------------ workspace.bzl | 10 ++++++--- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0fcbcb4..97d311f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,39 +22,39 @@ RUN dpkg --add-architecture arm64 RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - libc6-dev:arm64 \ - libc6-dev:armhf \ + libc6-dev:arm64 \ + libc6-dev:armhf \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - python3-all \ - python3-numpy \ - build-essential \ - crossbuild-essential-armhf \ - crossbuild-essential-arm64 \ - libusb-1.0-0-dev \ - libusb-1.0-0-dev:arm64 \ - libusb-1.0-0-dev:armhf \ - zlib1g-dev \ - zlib1g-dev:armhf \ - zlib1g-dev:arm64 \ - sudo \ - debhelper \ - pkg-config \ - zip \ - unzip \ - curl \ - wget \ - git \ - tree \ - software-properties-common \ - $(grep Ubuntu /etc/os-release > /dev/null && echo vim-common || echo xxd) + python3-all \ + python3-numpy \ + build-essential \ + crossbuild-essential-armhf \ + crossbuild-essential-arm64 \ + libusb-1.0-0-dev \ + libusb-1.0-0-dev:arm64 \ + libusb-1.0-0-dev:armhf \ + zlib1g-dev \ + zlib1g-dev:armhf \ + zlib1g-dev:arm64 \ + sudo \ + debhelper \ + pkg-config \ + zip \ + unzip \ + curl \ + wget \ + git \ + tree \ + software-properties-common \ + $(grep Ubuntu /etc/os-release > /dev/null && echo vim-common || echo xxd) # Bionic Beaver == Ubuntu 18.04 RUN if grep 'Bionic Beaver' /etc/os-release > /dev/null; then \ - add-apt-repository ppa:ubuntu-toolchain-r/test \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-9 g++-9; \ + add-apt-repository ppa:ubuntu-toolchain-r/test \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-9 g++-9; \ fi -ARG BAZEL_VERSION=6.5.0 +ARG BAZEL_VERSION=7.6.0 RUN wget -O /bazel https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh && \ bash /bazel && \ rm -f /bazel diff --git a/workspace.bzl b/workspace.bzl index 979e44d..c97b6a9 100644 --- a/workspace.bzl +++ b/workspace.bzl @@ -45,9 +45,13 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") #TENSORFLOW_COMMIT = "6887368d6d46223f460358323c4b76d61d1558a8" #TENSORFLOW_SHA256 = "bb25fa4574e42ea4d452979e1d2ba3b86b39569d6b8106a846a238b880d73652" -# TF release 2.16.1 as of 03/07/2024. Current. -TENSORFLOW_COMMIT = "5bc9d26649cca274750ad3625bd93422617eed4b" -TENSORFLOW_SHA256 = "fe592915c85d1a89c20f3dd89db0772ee22a0fbda78e39aa46a778d638a96abc" +# TF release 2.16.1 as of 03/07/2024. +#TENSORFLOW_COMMIT = "5bc9d26649cca274750ad3625bd93422617eed4b" +#TENSORFLOW_SHA256 = "fe592915c85d1a89c20f3dd89db0772ee22a0fbda78e39aa46a778d638a96abc" + +# TF release 2.17.1 as of 10/15/2024. Current working +TENSORFLOW_COMMIT = "3c92ac03cab816044f7b18a86eb86aa01a294d95" +TENSORFLOW_SHA256 = "317dd95c4830a408b14f3e802698eb68d70d81c7c7cfcd3d28b0ba023fe84a68" #CORAL_CROSSTOOL_COMMIT = "6bcc2261d9fc60dff386b557428d98917f0af491" #CORAL_CROSSTOOL_SHA256 = "38cb4da13009d07ebc2fed4a9d055b0f914191b344dd2d1ca5803096343958b4" From e00fd64416bfdbc1e68b62997668042e63498b25 Mon Sep 17 00:00:00 2001 From: Joseph Prince Mathew Date: Wed, 26 Mar 2025 16:51:33 -0400 Subject: [PATCH 3/5] Update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 93b899a..7ea529f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ bazel-* out/ dist/ .DS_Store +MODULE.* From 23da6f737a277983781929928d677f67f723835c Mon Sep 17 00:00:00 2001 From: Joseph Prince Mathew Date: Wed, 26 Mar 2025 17:24:13 -0400 Subject: [PATCH 4/5] Back to tensorflow v2.16.1 --- workspace.bzl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/workspace.bzl b/workspace.bzl index c97b6a9..da63579 100644 --- a/workspace.bzl +++ b/workspace.bzl @@ -45,13 +45,13 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") #TENSORFLOW_COMMIT = "6887368d6d46223f460358323c4b76d61d1558a8" #TENSORFLOW_SHA256 = "bb25fa4574e42ea4d452979e1d2ba3b86b39569d6b8106a846a238b880d73652" -# TF release 2.16.1 as of 03/07/2024. -#TENSORFLOW_COMMIT = "5bc9d26649cca274750ad3625bd93422617eed4b" -#TENSORFLOW_SHA256 = "fe592915c85d1a89c20f3dd89db0772ee22a0fbda78e39aa46a778d638a96abc" +# TF release 2.16.1 as of 03/07/2024. Current in base repo +TENSORFLOW_COMMIT = "5bc9d26649cca274750ad3625bd93422617eed4b" +TENSORFLOW_SHA256 = "fe592915c85d1a89c20f3dd89db0772ee22a0fbda78e39aa46a778d638a96abc" # TF release 2.17.1 as of 10/15/2024. Current working -TENSORFLOW_COMMIT = "3c92ac03cab816044f7b18a86eb86aa01a294d95" -TENSORFLOW_SHA256 = "317dd95c4830a408b14f3e802698eb68d70d81c7c7cfcd3d28b0ba023fe84a68" +#TENSORFLOW_COMMIT = "3c92ac03cab816044f7b18a86eb86aa01a294d95" +#TENSORFLOW_SHA256 = "317dd95c4830a408b14f3e802698eb68d70d81c7c7cfcd3d28b0ba023fe84a68" #CORAL_CROSSTOOL_COMMIT = "6bcc2261d9fc60dff386b557428d98917f0af491" #CORAL_CROSSTOOL_SHA256 = "38cb4da13009d07ebc2fed4a9d055b0f914191b344dd2d1ca5803096343958b4" From 05231e54eb899448721a6bc4970cb5f4ebd74481 Mon Sep 17 00:00:00 2001 From: Joseph Prince Mathew Date: Thu, 27 Mar 2025 11:07:31 -0400 Subject: [PATCH 5/5] Bazel version 7 doesnot accept CPU argument. Changeing it back to v6 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 97d311f..eef68c0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -54,7 +54,7 @@ RUN if grep 'Bionic Beaver' /etc/os-release > /dev/null; then \ && DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-9 g++-9; \ fi -ARG BAZEL_VERSION=7.6.0 +ARG BAZEL_VERSION=6.5.0 RUN wget -O /bazel https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh && \ bash /bazel && \ rm -f /bazel