From 4f28555affadaf80915bd167680c59d29c5c1ced Mon Sep 17 00:00:00 2001 From: huweiqiang Date: Mon, 11 Dec 2023 19:47:32 +0800 Subject: [PATCH 1/2] bugfix(LD_LIBRARY_PATH): fix error of duplicating LD_LIBRARY_PATH values --- deepdataspace/services/dds.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/deepdataspace/services/dds.py b/deepdataspace/services/dds.py index 31de6ea..74fc5fe 100644 --- a/deepdataspace/services/dds.py +++ b/deepdataspace/services/dds.py @@ -315,20 +315,17 @@ def _init_shared_libs(self): url = f"{self.dl_prefix}/lib/libcurl.so.4.8.0" download_by_requests(url, config.SHARED_CURL_LIB) - if config.LD_LIBRARY_PATH is None: - config.LD_LIBRARY_PATH = config.SHARED_LIB_DIR - elif config.SHARED_LIB_DIR is not None and config.LD_LIBRARY_PATH != config.SHARED_LIB_DIR: - config.LD_LIBRARY_PATH = f"{config.SHARED_LIB_DIR}:{config.LD_LIBRARY_PATH}" + paths = {config.SHARED_LIB_DIR} + if config.LD_LIBRARY_PATH: + for path in config.LD_LIBRARY_PATH.split(":"): + paths.add(path) - ld_path = os.environ.get("LD_LIBRARY_PATH", None) - if ld_path is not None: - config.LD_LIBRARY_PATH = f"{ld_path}:{config.LD_LIBRARY_PATH}" - - current_lib_paths = find_shared_dirs_on_ubuntu() - current_lib_paths = ":".join(current_lib_paths) - if current_lib_paths: - config.LD_LIBRARY_PATH = f"{current_lib_paths}:{config.LD_LIBRARY_PATH}" + lib_paths = find_shared_dirs_on_ubuntu() + for path in lib_paths: + paths.add(path) + ld_library_path = ":".join(paths) + config.LD_LIBRARY_PATH = ld_library_path os.environ["LD_LIBRARY_PATH"] = config.LD_LIBRARY_PATH def _init_sentry(self): From f2445fbd81b8901c90a2974fd1f8d213d4d09857 Mon Sep 17 00:00:00 2001 From: huweiqiang Date: Wed, 13 Dec 2023 09:49:38 +0800 Subject: [PATCH 2/2] bugfix(init sample datasets): fix error of copying sample dataset files --- deepdataspace/services/dds.py | 1 + 1 file changed, 1 insertion(+) diff --git a/deepdataspace/services/dds.py b/deepdataspace/services/dds.py index 74fc5fe..e968f11 100644 --- a/deepdataspace/services/dds.py +++ b/deepdataspace/services/dds.py @@ -170,6 +170,7 @@ def _init_shared_files_and_dirs(self): if self.quickstart is True: if self.data_dir is None: self.data_dir = os.path.join(config.RUNTIME_DIR, "datasets") + os.makedirs(self.data_dir, exist_ok=True) self.init_samples() config.DATA_DIR = self.data_dir