agentsea / surfkit

A toolkit for building multimodal AI agents
https://docs.hub.agentsea.ai
MIT License
112 stars 10 forks source link

EC2 Device only supports for us-east-1 and requires default VPC? #87

Closed kun432 closed 4 months ago

kun432 commented 5 months ago

Trying EC2 for a device, surfkit create device failed because Exception: No default VPC found in this region.

$ surfkit create device --provider ec2 -n desktop01
Creating desktop 'desktop01' using 'ec2' provider
Key pair 'desktop01' already exists. Skipping import.
(snip)
│ ╭───────────────────────────────── locals ──────────────────────────────────╮                    │
│ │      _provider = <agentdesk.vm.ec2.EC2Provider object at 0x10f871ad0>     │                    │
│ │            cpu = 2                                                        │                    │
│ │           data = V1ProviderData(type='ec2', args={'region': 'us-east-1'}) │                    │
│ │           disk = '30gb'                                                   │                    │
│ │          image = None                                                     │                    │
│ │  load_provider = <function load_provider at 0x10fd536a0>                  │                    │
│ │         memory = 4                                                        │                    │
│ │           name = 'desktop01'                                              │                    │
│ │       provider = 'ec2'                                                    │                    │
│ │     reserve_ip = False                                                    │                    │
│ │           type = 'desktop'                                                │                    │
│ │ V1ProviderData = <class 'agentdesk.server.models.V1ProviderData'>         │                    │
│ ╰───────────────────────────────────────────────────────────────────────────╯                    │
(snip)
Exception: No default VPC found in this region.

my default region is ap-northeast-1 and there is a default VPC in that region. CLI output seems EC2 device currently supports only us-east-1 and no default VPC in us-east-1 in my end.

After I created a default VPC in us-east-1, this passed (but eventually failed because of another reason, will post as different issue.)

This might be a current limitaion but should be on the document.

pbarker commented 5 months ago

Hey @kun432 this should now be fixed in 0.1.226, we now support the following regions "us-east-1", "us-west-1", "us-west-2", "eu-west-1", "eu-central-1", "ap-southeast-1", "ap-northeast-1" https://github.com/agentsea/agentdesk/blob/main/agentdesk/vm/ec2.py#L28.

The command surfkit create device --provider ec2 --region ap-northeast-1 should now work, please let us know if there are further problems.