diff --git a/README.md b/README.md index d82a4b36e..b542f296d 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,8 @@ ALL=1 make -C opt clean build Note: in order to use the PyTorch backend on Linux, at least `gcc 4.9.2` is required. +[See this document](opt/build/README.md) for building AI dependencies at platforms. + ### Running the server You will need a redis-server version 5.0.7 or greater. This should be diff --git a/opt/build/README.md b/opt/build/README.md new file mode 100644 index 000000000..884e8f8c3 --- /dev/null +++ b/opt/build/README.md @@ -0,0 +1,9 @@ +# RedisAI dependency builds + +Platform dependency build systems are located in this folder. Dependencies are to be pre-built, and published to S3. To do so, they rely *(ultimately)* on running **make build publish** in a given directory. The goal is for this to be true on all target platforms (x86_64, arm64), though at this time it's only true for: tensorflowlite. + +## Background + +Items are built in docker images, for the target platform whenever possible. If needed (i.e a future planned MacOS build) items are built on the dedicated hardware. There are design wrinkles to each build. Though the ideal is to build a base docker (see the [automata repository](https://github.com/redislabsmodules/automata). That base docker is then used as the base build system injector for the dependency itself. A docker image is built from the base docker, accepting externalized variables such as the dependency version. Compilation of external requirements takes place in a build file, mounted inside the docker image. + +Ideally a per-platform Docker file (i.e Dockerfile.x64, Dockerfile.arm) will exist in the underlying folder, assuming building within a docker is tenable. \ No newline at end of file diff --git a/opt/build/tflite/README.md b/opt/build/tflite/README.md new file mode 100644 index 000000000..b6281fa47 --- /dev/null +++ b/opt/build/tflite/README.md @@ -0,0 +1,7 @@ +# tensorflowlite (tflite) + +### arm64 + +The arm build of tflite currently occurs on **jetson arm devices** only, as portions of the root filesystem of the Jetson device are mounted during the build. Given the symlinks that exist on the device between things in /usr/lib to /etc/alternatives, and in turn to /usr/local/cuda, which is itself a symlink to /usr/local/cuda-10.2, this is the current philosophy. + +WThe *build_arm* target in the [Makefile](Makefile) describes the process in detail. The code to build the base docker build image can be found in the [automata repository](https://github.com/RedisLabsModules/automata/tree/master/dockers/buildsystem/bazelbuilder). The *bazelbuilder* image is published to the [redisfab dockerhub repositories](https://hub.docker.com/r/redisfab/). \ No newline at end of file