From 1955ac8cfd8bb069b747a13b384682ff78a6afe8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 14 Oct 2023 16:41:51 -0400 Subject: [PATCH] fix py lmp plugin path for editable installtation Signed-off-by: Jinzhe Zeng --- deepmd/env.py | 1 + deepmd/lmp.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/deepmd/env.py b/deepmd/env.py index 075e37446f..9b7f86f0d5 100644 --- a/deepmd/env.py +++ b/deepmd/env.py @@ -89,6 +89,7 @@ def dlopen_library(module: str, filename: str): "global_cvt_2_tf_float", "global_cvt_2_ener_float", "MODEL_VERSION", + "SHARED_LIB_DIR", "SHARED_LIB_MODULE", "default_tf_session_config", "reset_default_tf_session_config", diff --git a/deepmd/lmp.py b/deepmd/lmp.py index fe08cc0a3b..5238cd9935 100644 --- a/deepmd/lmp.py +++ b/deepmd/lmp.py @@ -18,6 +18,7 @@ ) from deepmd.env import ( + SHARED_LIB_DIR, TF_VERSION, tf, ) @@ -74,7 +75,7 @@ def get_library_path(module: str, filename: str) -> List[str]: raise RuntimeError("Unsupported platform") tf_dir = tf.sysconfig.get_lib() -op_dir = str((Path(__file__).parent / "lib").absolute()) +op_dir = str(SHARED_LIB_DIR) cuda_library_paths = []