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 = []