From 1d5318315f6c9a249fe2b53879f2e0864cdc5836 Mon Sep 17 00:00:00 2001 From: Aarsh2001 Date: Wed, 4 Oct 2023 20:19:35 +0100 Subject: [PATCH] gcp auth --- .github/auth/vm_auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/auth/vm_auth.py b/.github/auth/vm_auth.py index 16ee156b..22c53bee 100644 --- a/.github/auth/vm_auth.py +++ b/.github/auth/vm_auth.py @@ -3,6 +3,7 @@ import paramiko import time import io +import os from google.auth import compute_engine from googleapiclient import discovery @@ -42,7 +43,8 @@ def start_runner(creds, path, ssh_username, id = "gpu-insatnce", zone='us-centra if __name__ == "__main__": username = sys.argv[1] # Start the instance - start_runner('gcp_auth.json', '~/.ssh/id_rsa', str(username)) + ssh_key_path = os.path.expanduser('~/.ssh/id_rsa') + start_runner('gcp_auth.json', ssh_key_path, str(username))