spotty-cloud / spotty

Training deep learning models on AWS and GCP instances
https://spotty.cloud
MIT License
491 stars 43 forks source link

'spotty sh' with private ip address #112

Closed Nomiizz closed 2 years ago

Nomiizz commented 2 years ago

I am using spotty to create spot EC2 instances in my own VPC. This means that the EC2 instance created does not have a public ip address. I pass in the correct instance profile and subnetid in spotty.yaml file and the EC2 instance comes up correctly. However, I am not able to connect to it with the 'spotty sh' command. If I don't pass in localSshPort: 22 option in the spotty.yaml file I get an error that the instance does not have a public IP address. However, with this option I get the error: ubuntu@127.0.0.1: Permission denied (publickey).

As a workaround I am looking up the private address of the instance through the AWS console and then connecting with: ssh ubuntu@{private-ip-addr} -i ~/.spotty/keys/aws/spotty-key-spotty-us-east-1 and then further connecting to the container with docker exec -it container_name '/bin/bash'

Is there a better way to do this? Maybe connect directly to the container with 'spotty sh' from the host machine somehow

apls777 commented 2 years ago

@Nomiizz Now it should be fixed in v1.3.3.