mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 08:14:56 +08:00
[gcp] Update config.py for safe dir creation (#9645)
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
@@ -309,6 +309,10 @@ def _configure_key_pair(config, compute):
|
||||
_create_project_ssh_key_pair(project, public_key, ssh_user,
|
||||
compute)
|
||||
|
||||
# Create the directory if it doesn't exists
|
||||
private_key_dir = os.path.dirname(private_key_path)
|
||||
os.makedirs(private_key_dir, exist_ok=True)
|
||||
|
||||
# We need to make sure to _create_ the file with the right
|
||||
# permissions. In order to do that we need to change the default
|
||||
# os.open behavior to include the mode we want.
|
||||
|
||||
Reference in New Issue
Block a user