File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 5252 if price_per_hour * DURATION < balance .amount :
5353 # Deploy a new 8V instance
5454 instance = datacrunch .instances .create (instance_type = INSTANCE_TYPE_8V ,
55- image = 'ubuntu-24 .04-cuda-12.8-open -docker' ,
55+ image = 'ubuntu-22 .04-cuda-12.0 -docker' ,
5656 ssh_key_ids = ssh_keys_ids ,
5757 hostname = 'example' ,
5858 description = 'large instance' ,
6363 else :
6464 # Deploy a new 4V instance
6565 instance = datacrunch .instances .create (instance_type = INSTANCE_TYPE_4V ,
66- image = 'ubuntu-24 .04-cuda-12.8-open -docker' ,
66+ image = 'ubuntu-22 .04-cuda-12.0 -docker' ,
6767 ssh_key_ids = ssh_keys_ids ,
6868 hostname = 'example' ,
6969 description = 'medium instance' )
Original file line number Diff line number Diff line change 1717
1818# Create a new 1V100.6V instance
1919instance = datacrunch .instances .create (instance_type = '1V100.6V' ,
20- image = 'ubuntu-24 .04-cuda-12.8-open -docker' ,
20+ image = 'ubuntu-22 .04-cuda-12.0 -docker' ,
2121 ssh_key_ids = ssh_keys_ids ,
2222 hostname = 'example' ,
2323 description = 'example instance' )
Original file line number Diff line number Diff line change 2121
2222# Create instance with extra attached volumes
2323instance_with_extra_volumes = datacrunch .instances .create (instance_type = '1V100.6V' ,
24- image = 'ubuntu-24 .04-cuda-12.8-open -docker' ,
24+ image = 'ubuntu-22 .04-cuda-12.0 -docker' ,
2525 ssh_key_ids = ssh_keys ,
2626 hostname = 'example' ,
2727 description = 'example instance' ,
3434
3535# Create instance with custom OS volume size and name
3636instance_with_custom_os_volume = datacrunch .instances .create (instance_type = '1V100.6V' ,
37- image = 'ubuntu-24 .04-cuda-12.8-open -docker' ,
37+ image = 'ubuntu-22 .04-cuda-12.0 -docker' ,
3838 ssh_key_ids = ssh_keys ,
3939 hostname = 'example' ,
4040 description = 'example instance' ,
5959 action = datacrunch .constants .instance_actions .DELETE ,
6060 volume_ids = [])
6161
62-
6362# Delete instance and one of it's volumes (will delete one volume, detach the rest)
6463datacrunch .instances .action (instance_id = EXAMPLE_INSTANCE_ID ,
6564 action = datacrunch .constants .instance_actions .DELETE ,
You can’t perform that action at this time.
0 commit comments