Skip to content

Commit

Permalink
Merge pull request #111 from IDEA-Research/bugfix/start_dds
Browse files Browse the repository at this point in the history
Bugfix/errors of starting dds
  • Loading branch information
imhuwq authored Dec 13, 2023
2 parents 98b0e63 + f2445fb commit f676242
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions deepdataspace/services/dds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -315,20 +316,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):
Expand Down

0 comments on commit f676242

Please sign in to comment.