⚠️ LiteRT replaces TensorFlow Lite. There are no plans to publish LiteRT packages, and this repository will be removed in the future.
TensorFlow Lite binaries are compiled with the GCC Toolchain targeting older glibc versions, ensuring compatibility across a wide range of Raspberry Pi boards running Raspberry Pi OS 64-bit.
- No official TensorFlow Lite packages. There are no prebuilt official TensorFlow Lite packages for Raspberry Pi OS, forcing users to compile it from source themselves.
- Slow compilation on Raspberry Pi. Building TensorFlow Lite directly on a Raspberry Pi can take hours and often runs into the limited RAM available on the device.
- No extra dependencies. The required libraries are statically linked, so the TensorFlow Lite binaries only depend on the base system libraries already present on Raspberry Pi OS.
- Dynamically linked with an older glibc version. For details, see the GCC Toolchain.
- Statically linked with libstdc++, and libgcc.
If you prefer not to build the TensorFlow Lite yourself, a precompiled TensorFlow Lite can be downloaded from the releases page.
curl -sSLo tensorflow-lite.deb https://github.com/prepkg/tensorflow-lite-raspberrypi/releases/latest/download/tensorflow-lite-aarch64-linux-gnu.deb \
&& sudo apt install -y ./tensorflow-lite.deb \
&& rm -rf tensorflow-lite.deb- Git
- Docker
- Clone the repository:
git clone https://github.com/prepkg/tensorflow-lite-raspberrypi.git && cd tensorflow-lite-raspberrypi- Build the Docker image:
./setup.sh build-image- Build the library:
./setup.sh build-libAfter compilation, the deb package will be available in the build directory.
- (Optional) Run the test to verify that the library links correctly and the resulting binary runs under QEMU:
./setup.sh test-lib