Skip to content

Commit 887b834

Browse files
committed
replaced fastai image
1 parent 92a4633 commit 887b834

File tree

11 files changed

+39
-33
lines changed

11 files changed

+39
-33
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
5454

5555
# Create a new instance
5656
instance = datacrunch.instances.create(instance_type='1V100.6V',
57-
image='fastai',
57+
image='ubuntu-24.04-cuda-12.8-open-docker',
5858
ssh_key_ids=ssh_keys,
5959
hostname='example',
6060
description='example instance')

docs/source/examples/advanced_create_instance.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Advanced Create Instance
5656
if price_per_hour * DURATION < balance.amount:
5757
# Deploy a new 8V instance
5858
instance = datacrunch.instances.create(instance_type=INSTANCE_TYPE_8V,
59-
image='fastai',
59+
image='ubuntu-24.04-cuda-12.8-open-docker',
6060
ssh_key_ids=ssh_keys_ids,
6161
hostname='example',
6262
description='large instance'
@@ -67,7 +67,7 @@ Advanced Create Instance
6767
else:
6868
# Deploy a new 4V instance
6969
instance = datacrunch.instances.create(instance_type=INSTANCE_TYPE_4V,
70-
image='fastai',
70+
image='ubuntu-24.04-cuda-12.8-open-docker',
7171
ssh_key_ids=ssh_keys_ids,
7272
hostname='example',
7373
description='medium instance')

docs/source/examples/instance_actions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Instance Actions
2222
2323
# Create a new 1V100.6V instance
2424
instance = datacrunch.instances.create(instance_type='1V100.6V',
25-
image='fastai',
25+
image='ubuntu-24.04-cuda-12.8-open-docker',
2626
ssh_key_ids=ssh_keys_ids,
2727
hostname='example',
2828
description='example instance')

docs/source/examples/instances_and_volumes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Instances and Volumes
2727
2828
# Create instance with extra attached volumes
2929
instance_with_extra_volumes = datacrunch.instances.create(instance_type='1V100.6V',
30-
image='fastai',
30+
image='ubuntu-24.04-cuda-12.8-open-docker',
3131
ssh_key_ids=ssh_keys,
3232
hostname='example',
3333
description='example instance',
@@ -38,7 +38,7 @@ Instances and Volumes
3838
3939
# Create instance with custom OS volume size and name
4040
instance_with_custom_os_volume = datacrunch.instances.create(instance_type='1V100.6V',
41-
image='fastai',
41+
image='ubuntu-24.04-cuda-12.8-open-docker',
4242
ssh_key_ids=ssh_keys,
4343
hostname='example',
4444
description='example instance',

docs/source/examples/simple_create_instance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Simple Create Instance
1919
2020
# Create a new instance
2121
instance = datacrunch.instances.create(instance_type='1V100.6V',
22-
image='fastai',
22+
image='ubuntu-24.04-cuda-12.8-open-docker',
2323
ssh_key_ids=ssh_keys_ids,
2424
hostname='example',
2525
description='example instance')

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Deploy a new instance:
3737
3838
# Create a new instance
3939
instance = datacrunch.instances.create(instance_type='1V100.6V',
40-
image='fastai',
40+
image='ubuntu-24.04-cuda-12.8-open-docker',
4141
ssh_key_ids=ssh_keys_ids,
4242
hostname='example',
4343
description='example instance')

examples/advanced_create_instance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@
5151
if price_per_hour * DURATION < balance.amount:
5252
# Deploy a new 8V instance
5353
instance = datacrunch.instances.create(instance_type=INSTANCE_TYPE_8V,
54-
image='fastai',
54+
image='ubuntu-24.04-cuda-12.8-open-docker',
5555
ssh_key_ids=ssh_keys_ids,
5656
hostname='example',
5757
description='large instance',
5858
os_volume={
59-
"name": "Large OS volume",
60-
"size": 95
61-
})
59+
"name": "Large OS volume",
60+
"size": 95
61+
})
6262
else:
6363
# Deploy a new 4V instance
6464
instance = datacrunch.instances.create(instance_type=INSTANCE_TYPE_4V,
65-
image='fastai',
65+
image='ubuntu-24.04-cuda-12.8-open-docker',
6666
ssh_key_ids=ssh_keys_ids,
6767
hostname='example',
6868
description='medium instance')

examples/instance_actions.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Create a new 1V100.6V instance
1919
instance = datacrunch.instances.create(instance_type='1V100.6V',
20-
image='fastai',
20+
image='ubuntu-24.04-cuda-12.8-open-docker',
2121
ssh_key_ids=ssh_keys_ids,
2222
hostname='example',
2323
description='example instance')
@@ -27,28 +27,31 @@
2727
# Try to shutdown instance right away,
2828
# encounter an error (because it's still provisioning)
2929
try:
30-
datacrunch.instances.action(instance.id, datacrunch.constants.instance_actions.SHUTDOWN)
30+
datacrunch.instances.action(
31+
instance.id, datacrunch.constants.instance_actions.SHUTDOWN)
3132
except APIException as exception:
3233
print(exception) # we were too eager...
3334

3435
# Wait until instance is running (check every 30sec), only then shut it down
35-
while(instance.status != datacrunch.constants.instance_status.RUNNING):
36+
while (instance.status != datacrunch.constants.instance_status.RUNNING):
3637
time.sleep(30)
3738
instance = datacrunch.instances.get_by_id(instance.id)
3839

3940
# Shutdown!
4041
try:
41-
datacrunch.instances.action(instance.id, datacrunch.constants.instance_actions.SHUTDOWN)
42+
datacrunch.instances.action(
43+
instance.id, datacrunch.constants.instance_actions.SHUTDOWN)
4244
except APIException as exception:
4345
print(exception) # no exception this time
4446

4547
# Wait until instance is offline (check every 30sec), only then hibernate
46-
while(instance.status != datacrunch.constants.instance_status.OFFLINE):
48+
while (instance.status != datacrunch.constants.instance_status.OFFLINE):
4749
time.sleep(30)
4850
instance = datacrunch.instances.get_by_id(instance.id)
4951

5052
# Hibernate the instance
5153
try:
52-
datacrunch.instances.action(instance.id, datacrunch.constants.instance_actions.HIBERNATE)
54+
datacrunch.instances.action(
55+
instance.id, datacrunch.constants.instance_actions.HIBERNATE)
5356
except APIException as exception:
5457
print(exception)

examples/instances_and_volumes.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,27 @@
2121

2222
# Create instance with extra attached volumes
2323
instance_with_extra_volumes = datacrunch.instances.create(instance_type='1V100.6V',
24-
image='fastai',
24+
image='ubuntu-24.04-cuda-12.8-open-docker',
2525
ssh_key_ids=ssh_keys,
2626
hostname='example',
2727
description='example instance',
2828
volumes=[
29-
{"type": HDD, "name": "volume-1", "size": 95},
30-
{"type": NVMe, "name": "volume-2", "size": 95}
29+
{"type": HDD, "name": "volume-1",
30+
"size": 95},
31+
{"type": NVMe,
32+
"name": "volume-2", "size": 95}
3133
])
3234

3335
# Create instance with custom OS volume size and name
3436
instance_with_custom_os_volume = datacrunch.instances.create(instance_type='1V100.6V',
35-
image='fastai',
36-
ssh_key_ids=ssh_keys,
37-
hostname='example',
38-
description='example instance',
39-
os_volume={
40-
"name": "OS volume",
41-
"size": 95
42-
})
37+
image='ubuntu-24.04-cuda-12.8-open-docker',
38+
ssh_key_ids=ssh_keys,
39+
hostname='example',
40+
description='example instance',
41+
os_volume={
42+
"name": "OS volume",
43+
"size": 95
44+
})
4345

4446
# Create instance with existing OS volume as an image
4547
instance_with_existing_os_volume = datacrunch.instances.create(instance_type='1V100.6V',

examples/simple_create_instance.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
# Create a new instance
1616
instance = datacrunch.instances.create(instance_type='1V100.6V',
17-
image='fastai',
17+
image='ubuntu-24.04-cuda-12.8-open-docker',
1818
ssh_key_ids=ssh_keys_ids,
1919
hostname='example',
2020
description='example instance')
2121

2222
# Delete instance
23-
datacrunch.instances.action(instance.id, datacrunch.constants.instance_actions.DELETE)
23+
datacrunch.instances.action(
24+
instance.id, datacrunch.constants.instance_actions.DELETE)

0 commit comments

Comments
 (0)