def _prepare_runtime_env(self, job_runtime_env) -> List[str]: """Download runtime environment to local node""" missing_uris = [] uris = job_runtime_env.uris from ray._private import runtime_env with disable_client_hook(): for uri in uris: try: runtime_env.fetch_package(uri) print("Adding!: ", runtime_env._get_local_path(uri)) sys.path.insert(0, str(runtime_env._get_local_path(uri))) except IOError: missing_uris.append(uri) return missing_uris
def _prepare_runtime_env(self, job_runtime_env) -> List[str]: """Download runtime environment to local node""" missing_uris = [] uris = job_runtime_env.uris from ray._private import runtime_env with disable_client_hook(): for uri in uris: try: working_dir = runtime_env.fetch_package(uri) if working_dir: os.chdir(str(working_dir)) sys.path.insert(0, str(working_dir)) except IOError: missing_uris.append(uri) return missing_uris