Add build.sh and update build_and_update_gcr.py
diff --git a/build_tools/docker/build_and_update_gcr.py b/build_tools/docker/build_and_update_gcr.py index 531088f..95f7c14 100755 --- a/build_tools/docker/build_and_update_gcr.py +++ b/build_tools/docker/build_and_update_gcr.py
@@ -33,6 +33,7 @@ 'bazel': [], 'bazel-bindings': ['bazel'], 'bazel-tensorflow': ['bazel-bindings'], + 'bazel-nvidia': ['bazel-tensorflow'], 'cmake': [], 'cmake-android': ['cmake'], 'cmake-nvidia': ['cmake'],
diff --git a/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build.sh b/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build.sh new file mode 100755 index 0000000..51b491d --- /dev/null +++ b/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build.sh
@@ -0,0 +1,43 @@ +#!/bin/bash + +# Copyright 2019 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. + +# For use within a IREE bazel-nvidia docker image on a Kokoro VM. +# Log some information about the environment, initialize the submodules and then +# run the bazel integrations tests. + +set -e +set -x + +# Print the UTC time when set -x is on +export PS4='[$(date -u "+%T %Z")] ' + +# Check these exist and print the versions for later debugging +bazel --version +"$CXX" --version +"$CC" --version +"$PYTHON_BIN" -V +# TODO(#1875): Make PYTHON_BIN also control the runtime version +python3 -V + +# Print Vulkan related information: SDK version and GPU ICD version +vulkaninfo 2>/dev/null | grep "Vulkan Instance" || echo "Vulkan Instance not found!" +vulkaninfo 2>/dev/null | grep -A7 "VkPhysicalDeviceProperties" || echo "VkPhysicalDeviceProperties not found!" + +echo "Initializing submodules" +./scripts/git/submodule_versions.py init + +echo "Building and testing with bazel" +./build_tools/bazel/build_tensorflow.sh
diff --git a/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build_kokoro.sh b/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build_kokoro.sh index 90b90b0..ce5df8c 100755 --- a/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build_kokoro.sh +++ b/build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build_kokoro.sh
@@ -35,7 +35,7 @@ --env IREE_VULKAN_DISABLE=0 \ --gpus all \ gcr.io/iree-oss/bazel-nvidia:prod \ - build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/integrations/build.sh + build_tools/kokoro/gcp_ubuntu/bazel/linux/x86/turing/build.sh # Kokoro will rsync this entire directory back to the executor orchestrating the # build which takes forever and is totally useless.