From f5bb131fd964ba62a212d395e91e1e1e994b23cf Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 5 Feb 2024 04:25:19 -0500 Subject: [PATCH] fix DP_ENABLE_TENSORFLOW support (#3229) Avoid installing tensorflow as build requires when `DP_ENABLE_TENSORFLOW` is `0`. Signed-off-by: Jinzhe Zeng --- backend/find_tensorflow.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/find_tensorflow.py b/backend/find_tensorflow.py index b43b32f954..c4d58ea0cd 100644 --- a/backend/find_tensorflow.py +++ b/backend/find_tensorflow.py @@ -47,6 +47,8 @@ def find_tensorflow() -> Tuple[Optional[str], List[str]]: list of str TensorFlow requirement if not found. Empty if found. """ + if os.environ.get("DP_ENABLE_TENSORFLOW", "1") == "0": + return None, [] requires = [] tf_spec = None