Skip to content

Commit 3cc68d9

Browse files
committed
Update to tensorflow 2.16.1
1 parent 7522f1e commit 3cc68d9

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Dockerfile.aarch64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2020
RUN python3 -m pip install --no-cache-dir --break-system-packages \
2121
protobuf==3.20.3 \
2222
tensorflow-io==0.35.0 \
23-
tensorflow==2.14.0
23+
tensorflow==2.16.1

Dockerfile.amd64-noavx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1818

1919
# Install Tensorflow NOAVX and Deps
2020
RUN python3 -m pip install --no-cache-dir --break-system-packages \
21-
https://github.com/snowzach/tensorflow-multiarch/releases/download/v2.14.0/tensorflow-2.14.0-cp311-cp311-linux_x86_64.whl
21+
https://github.com/snowzach/tensorflow-multiarch/releases/download/v2.16.1/tensorflow-2.16.1-cp311-cp311-linux_x86_64.whl
2222

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is my attempt to build a recent Tensorflow wheel and Docker image compatible with multiple architectures and processors.
44

5-
It's currently using Tensorflow v2.14.0
5+
It's currently using Tensorflow v2.16.1
66

77
It supports the following architectures:
88
- ARM32
@@ -16,7 +16,7 @@ The docker images are `docker.io/snowzach/tensorflow-multiarch` [here](https://h
1616
The default/latest docker images includes arm32, arm64 and amd64-noavx
1717

1818
## Compiling Tensorflow Wheel
19-
I checked out the Tensorflow source at version 2.14.0 and I had to edit the file `tensorflow/tools/ci_build/pi/build_raspberry_pi.sh` and insert on line 99 to add an ARMHF target.
19+
I checked out the Tensorflow source at version 2.16.1 and I had to edit the file `tensorflow/tools/ci_build/pi/build_raspberry_pi.sh` and insert on line 99 to add an ARMHF target.
2020
```
2121
elif [[ $1 == "ARMHF" ]]; then
2222
PI_COPTS="--config=elinux_armhf
@@ -35,7 +35,7 @@ $ tensorflow/tools/ci_build/ci_build.sh PI-PYTHON38 \
3535
```
3636
After running the command there was working python whl and library in the `output-artifacts` directory.
3737

38-
I renamed the armhf output wheel from `tensorflow-2.14.0-cp38-none-linux_armhf.whl` to `tensorflow-2.14.0-cp38-none-linux_armv7l.whl` to ensure it matched the hardware architecture and would be installed by python.
38+
I renamed the armhf output wheel from `tensorflow-2.16.1-cp38-none-linux_armhf.whl` to `tensorflow-2.16.1-cp38-none-linux_armv7l.whl` to ensure it matched the hardware architecture and would be installed by python.
3939

4040
# Tensorflow IO
4141
Tensorflow IO is required in order to install the Tensorflow wheel. There seems to be a chicken-egg problem
@@ -50,7 +50,7 @@ $ git clone https://github.com/tensorflow/io.git
5050
$ cd io
5151
$ git checkout v0.23.1
5252
$ python3 setup.py install # Install just the python code
53-
$ python3 -m pip install tensorflow-2.14.0-cp38-none-linux_<arch>.whl # Install tensorflow wheel
53+
$ python3 -m pip install tensorflow-2.16.1-cp38-none-linux_<arch>.whl # Install tensorflow wheel
5454
```
5555

5656
From there I compiled Tensorflow IO with
@@ -74,18 +74,18 @@ I build them with docker buildx with these commands:
7474
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
7575
7676
# Build the docker images
77-
docker buildx build --push --platform linux/arm/v7 -f Dockerfile.armv7l --tag docker.io/snowzach/tensorflow-multiarch:2.14.0-armv7l .
78-
docker buildx build --push --platform linux/arm64/v8 -f Dockerfile.aarch64 --tag docker.io/snowzach/tensorflow-multiarch:2.14.0-aarch64 .
79-
docker buildx build --push --platform linux/amd64 -f Dockerfile.amd64-noavx --tag docker.io/snowzach/tensorflow-multiarch:2.14.0-amd64-noavx .
77+
docker buildx build --push --platform linux/arm/v7 -f Dockerfile.armv7l --tag docker.io/snowzach/tensorflow-multiarch:2.16.1-armv7l .
78+
docker buildx build --push --platform linux/arm64/v8 -f Dockerfile.aarch64 --tag docker.io/snowzach/tensorflow-multiarch:2.16.1-aarch64 .
79+
docker buildx build --push --platform linux/amd64 -f Dockerfile.amd64-noavx --tag docker.io/snowzach/tensorflow-multiarch:2.16.1-amd64-noavx .
8080
81-
# Tag the releases as 2.14.0
82-
docker manifest push --purge docker.io/snowzach/tensorflow-multiarch:2.14.0
83-
docker manifest create docker.io/snowzach/tensorflow-multiarch:2.14.0 docker.io/snowzach/tensorflow-multiarch:2.14.0-armv7l docker.io/snowzach/tensorflow-multiarch:2.14.0-aarch64 docker.io/snowzach/tensorflow-multiarch:2.14.0-amd64-noavx
84-
docker manifest push docker.io/snowzach/tensorflow-multiarch:2.14.0
81+
# Tag the releases as 2.16.1
82+
docker manifest push --purge docker.io/snowzach/tensorflow-multiarch:2.16.1
83+
docker manifest create docker.io/snowzach/tensorflow-multiarch:2.16.1 docker.io/snowzach/tensorflow-multiarch:2.16.1-armv7l docker.io/snowzach/tensorflow-multiarch:2.16.1-aarch64 docker.io/snowzach/tensorflow-multiarch:2.16.1-amd64-noavx
84+
docker manifest push docker.io/snowzach/tensorflow-multiarch:2.16.1
8585
8686
# Tag the releases as latest
8787
docker manifest push --purge docker.io/snowzach/tensorflow-multiarch:latest
88-
docker manifest create docker.io/snowzach/tensorflow-multiarch:latest docker.io/snowzach/tensorflow-multiarch:2.14.0-armv7l docker.io/snowzach/tensorflow-multiarch:2.14.0-aarch64 docker.io/snowzach/tensorflow-multiarch:2.14.0-amd64-noavx
88+
docker manifest create docker.io/snowzach/tensorflow-multiarch:latest docker.io/snowzach/tensorflow-multiarch:2.16.1-armv7l docker.io/snowzach/tensorflow-multiarch:2.16.1-aarch64 docker.io/snowzach/tensorflow-multiarch:2.16.1-amd64-noavx
8989
docker manifest push docker.io/snowzach/tensorflow-multiarch:latest
9090
9191
```

build-tensorflow-noavx.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ apt-get update && apt-get install -y --no-install-recommends \
1212
libc6-dev libstdc++6 libusb-1.0-0 patchelf llvm-16 clang-16
1313

1414
export PROTOC_VERSION="3.20.3"
15-
export BAZEL_VERSION="6.1.0"
16-
export TF_VERSION="v2.14.0"
15+
export BAZEL_VERSION="6.5.0"
16+
export TF_VERSION="v2.16.1"
1717
export TF_PYTHON_VERSION=3.11
1818

1919
# Install protoc

0 commit comments

Comments
 (0)