Enable remote config for Python 3 on Ubuntu 16.04 RBE

Also, delete the checked in preconfig.

PiperOrigin-RevId: 296421465
Change-Id: Icaf2ea68fe9b766d0d608a01f7048290f14abcb5
This commit is contained in:
Jakob Buchgraber 2020-02-21 06:12:03 -08:00 committed by TensorFlower Gardener
parent a5a4af8d3c
commit c12eacd2f4
8 changed files with 29 additions and 219 deletions

View File

@ -386,9 +386,8 @@ build:rbe_linux_py2 --python_path="/usr/bin/python2"
build:rbe_linux_py2 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py"
build:rbe_linux_py3 --config=rbe_linux
build:rbe_linux_py3 --repo_env=PYTHON_BIN_PATH="/usr/bin/python3"
build:rbe_linux_py3 --python_path="/usr/bin/python3"
build:rbe_linux_py3 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py3"
build:rbe_linux_py3 --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu16.04-manylinux2010-py3_config_python"
build:rbe_win --config=rbe
build:rbe_win --crosstool_top="@org_tensorflow//third_party/toolchains/preconfig/win_1803/bazel_121:toolchain"

View File

@ -237,7 +237,6 @@ tensorflow/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010/BUILD
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010/cc_toolchain_config.bzl
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010/dummy_toolchain.bzl
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/py/BUILD
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/py3/BUILD
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/tensorrt5/BUILD
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/tensorrt6.0/BUILD
tensorflow/third_party/toolchains/preconfig/ubuntu16.04/tensorrt6.0/build_defs.bzl

View File

@ -55,9 +55,8 @@ function run_build () {
--config=rbe \
--python_path="${PYTHON_BIN_PATH}" \
--action_env=PATH="${ACTION_PATH}" \
--action_env=PYTHON_BIN_PATH="${PYTHON_BIN_PATH}" \
--action_env=TF2_BEHAVIOR="${TF2_BEHAVIOR}" \
--action_env=TF_PYTHON_CONFIG_REPO=@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py3 \
--action_env=TF_PYTHON_CONFIG_REPO="@ubuntu16.04-manylinux2010-py3_config_python" \
--action_env=TF_ENABLE_XLA=1 \
--test_tag_filters="${tag_filters}" \
--build_tag_filters="${tag_filters}" \

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
# DO NOT EDIT: automatically generated WORKSPACE file for python_configure rule
workspace(name = "local_config_python")

View File

@ -3,6 +3,13 @@
load("//third_party/toolchains/remote_config:rbe_config.bzl", "tensorflow_rbe_config")
def initialize_rbe_configs():
tensorflow_rbe_config(
name = "ubuntu16.04-manylinux2010-py3",
os = "ubuntu16.04-manylinux2010",
python_version = "3",
compiler = "",
)
tensorflow_rbe_config(
name = "ubuntu16.04-py3-gcc7_manylinux2010-cuda10.0-cudnn7-tensorrt5.1",
compiler = "/dt7/usr/bin/gcc",

View File

@ -3,6 +3,12 @@
load("//third_party/toolchains/preconfig/generate:containers.bzl", "container_digests")
containers = {
# Built with //tensorflow/tools/ci_build/Dockerfile.rbe.ubuntu16.04-manylinux2010.
"ubuntu16.04-manylinux2010": {
"registry": "gcr.io",
"repository": "tensorflow-testing/nosla-ubuntu16.04-manylinux2010",
"digest": container_digests["ubuntu16.04-manylinux2010"],
},
# Built with //tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.0-cudnn7-ubuntu16.04-manylinux2010.
"cuda10.0-cudnn7-ubuntu16.04-manylinux2010": {

View File

@ -13,9 +13,6 @@ def _container_image_uri(container_name):
return "docker://%s/%s@%s" % (container["registry"], container["repository"], container["digest"])
def _tensorflow_rbe_config(name, compiler, python_version, os, rocm_version = None, cuda_version = None, cudnn_version = None, tensorrt_version = None, tensorrt_install_path = None, cudnn_install_path = None, compiler_prefix = None, sysroot = None):
if cuda_version == None and rocm_version == None:
fail("Neither cuda_version nor rocm_version specified. You need to specify exactly one.")
if cuda_version != None and rocm_version != None:
fail("Specifying both cuda_version and rocm_version is not supported.")
@ -121,5 +118,19 @@ def _tensorflow_rbe_config(name, compiler, python_version, os, rocm_version = No
environ = env,
exec_properties = exec_properties,
)
elif python_version != None:
container_image = _container_image_uri(os)
exec_properties = {
"container-image": container_image,
"Pool": "default",
}
remote_python_configure(
name = "%s_config_python" % name,
environ = env,
exec_properties = exec_properties,
)
else:
fail("Neither cuda_version, rocm_version nor python_version specified.")
tensorflow_rbe_config = _tensorflow_rbe_config