Skip to content

Commit

Permalink
gcp auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Oct 4, 2023
1 parent 413c01e commit 68fa487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/auth/vm_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def authenticate_vm(path):
return discovery.build('compute', 'v1', credentials=credentials)
def start_runner(creds, key, ssh_username, id = "gpu-insatnce", zone='us-central1-a', instance='demos-tests'):
compute = authenticate_vm(creds)
compute.instances().start(project=id, zone=zone, instance=instance).execute()
request = compute.instances().start(project=id, zone=zone, instance=instance)\
request.execute()
time.sleep(60)

# Get the SSH username (assuming it's stored in the credentials)
Expand Down

0 comments on commit 68fa487

Please sign in to comment.