Add a docker image bundling ML frameworks and Android NDK (#5920)
This will be used for generating benchmark artifacts from Python
ML framework models to run on Android devices.
diff --git a/build_tools/docker/cmake-bazel-frontends-android/Dockerfile b/build_tools/docker/cmake-bazel-frontends-android/Dockerfile
new file mode 100644
index 0000000..ff1416f
--- /dev/null
+++ b/build_tools/docker/cmake-bazel-frontends-android/Dockerfile
@@ -0,0 +1,23 @@
+# Copyright 2021 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM gcr.io/iree-oss/cmake-bazel-frontends@sha256:699f6470e618c151f36cb4769ccaf2cfbf334ddb2fc2b6e69eb60732fe69bb6b AS final
+
+# Note that NDK_VERSION should be kept in sync with the one in cmake-android.
+# That actually means this isn't really an ARG because we cannot build this
+# image with a different NDK version.
+ARG NDK_VERSION=r21d
+COPY --from=gcr.io/iree-oss/cmake-android@sha256:15d3266ae4865f7642a4ef4d76e5181f0dc3482a7cfba9021b6b55be524208ec "/usr/src/android-ndk-${NDK_VERSION}" "/usr/src/android-ndk-${NDK_VERSION}"
+ENV ANDROID_NDK "/usr/src/android-ndk-${NDK_VERSION}"
+
diff --git a/build_tools/docker/manage_images.py b/build_tools/docker/manage_images.py
index 9b80b5c..3719ed3 100755
--- a/build_tools/docker/manage_images.py
+++ b/build_tools/docker/manage_images.py
@@ -60,6 +60,7 @@
'cmake-python-nvidia': ['cmake-python-vulkan'],
'cmake-riscv': ['cmake', 'util'],
'cmake-bazel-frontends': ['cmake-python', 'bazel'],
+ 'cmake-bazel-frontends-android': ['cmake-bazel-frontends', 'cmake-android'],
'cmake-bazel-frontends-vulkan': ['cmake-bazel-frontends', 'vulkan'],
'cmake-bazel-frontends-swiftshader': [
'cmake-bazel-frontends-vulkan', 'swiftshader'
diff --git a/build_tools/docker/prod_digests.txt b/build_tools/docker/prod_digests.txt
index 9d8a060..5b78ded 100644
--- a/build_tools/docker/prod_digests.txt
+++ b/build_tools/docker/prod_digests.txt
@@ -15,3 +15,4 @@
gcr.io/iree-oss/cmake-bazel-frontends-nvidia@sha256:79998983c574bb6fd0625a99a541364749c76f8ff6c6ee98411b612a9950470b
gcr.io/iree-oss/cmake-bazel-frontends-swiftshader@sha256:012dd9b452da5c4f4248edf27a7a7faa0eeca6a7a2a1e21d00bc932b125246e1
gcr.io/iree-oss/cmake-riscv@sha256:a09ff1e6ab65a436822894acf58ef6c4cbc523581960e918a07ddf4a46c8af95
+gcr.io/iree-oss/cmake-bazel-frontends-android@sha256:dd11a49fa357ac3f96ef53c26b1faaf24ce834383300d1ed464e810bb33fafe7