shadeform
any DAG graph when one or more tasks can benefit from the execution on a GPU machine. See examples for a demonstrationon how to use it
Installation
dagger install github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3
Entrypoint
Return Type
Shadeform !
Arguments
Name | Type | Description |
---|---|---|
name | String ! | No description provided |
shadeToken | Secret ! | A reference to a secret value, which can be handled more safely than the value itself. |
vmId | String | No description provided |
sshKey | File | No description provided |
cache | CacheVolume | No description provided |
templateFile | File | No description provided |
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET
func (m *myModule) example(name string, shadeToken *Secret) *Shadeform {
return dag.
Shadeform(name, shadeToken)
}
@function
def example(name: str, shade_token: dagger.Secret, ) -> dag.Shadeform:
return (
dag.shadeform(name, shade_token)
)
@func()
example(name: string, shadeToken: Secret, ): Shadeform {
return dag
.shadeform(name, shadeToken)
}
Types
Shadeform 🔗
client() 🔗
Return a CURL debug client with cache (vm information) mounted.
Return Type
Container !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET client
func (m *myModule) example(name string, shadeToken *Secret) *Container {
return dag.
Shadeform(name, shadeToken).
Client()
}
@function
def example(name: str, shade_token: dagger.Secret, ) -> dagger.Container:
return (
dag.shadeform(name, shade_token)
.client()
)
@func()
example(name: string, shadeToken: Secret, ): Container {
return dag
.shadeform(name, shadeToken)
.client()
}
createVm() 🔗
Returns a container executing all the needed steps for creating a machine starting from passed parameters
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cloud | String ! | - | No description provided |
region | String ! | - | No description provided |
shadeInstanceType | String ! | - | No description provided |
shadeCloud | String ! | - | No description provided |
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET create-vm --cloud string --region string --shade-instance-type string --shade-cloud string
func (m *myModule) example(name string, shadeToken *Secret, cloud string, region string, shadeInstanceType string, shadeCloud string) *Container {
return dag.
Shadeform(name, shadeToken).
CreateVm(cloud, region, shadeInstanceType, shadeCloud)
}
@function
def example(name: str, shade_token: dagger.Secret, cloud: str, region: str, shade_instance_type: str, shade_cloud: str) -> dagger.Container:
return (
dag.shadeform(name, shade_token)
.create_vm(cloud, region, shade_instance_type, shade_cloud)
)
@func()
example(name: string, shadeToken: Secret, cloud: string, region: string, shadeInstanceType: string, shadeCloud: string): Container {
return dag
.shadeform(name, shadeToken)
.createVm(cloud, region, shadeInstanceType, shadeCloud)
}
getVmId() 🔗
Return the VM ID
Return Type
String !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET get-vm-id
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret) string {
return dag.
Shadeform(name, shadeToken).
GetVmId(ctx)
}
@function
async def example(name: str, shade_token: dagger.Secret, ) -> str:
return await (
dag.shadeform(name, shade_token)
.get_vm_id()
)
@func()
async example(name: string, shadeToken: Secret, ): Promise<string> {
return dag
.shadeform(name, shadeToken)
.getVmId()
}
getVmInfo() 🔗
Return the VM info JSON
Return Type
String !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET get-vm-info
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret) string {
return dag.
Shadeform(name, shadeToken).
GetVmInfo(ctx)
}
@function
async def example(name: str, shade_token: dagger.Secret, ) -> str:
return await (
dag.shadeform(name, shade_token)
.get_vm_info()
)
@func()
async example(name: string, shadeToken: Secret, ): Promise<string> {
return dag
.shadeform(name, shadeToken)
.getVmInfo()
}
getVmStatus() 🔗
Print the VM status
Return Type
String !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET get-vm-status
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret) string {
return dag.
Shadeform(name, shadeToken).
GetVmStatus(ctx)
}
@function
async def example(name: str, shade_token: dagger.Secret, ) -> str:
return await (
dag.shadeform(name, shade_token)
.get_vm_status()
)
@func()
async example(name: string, shadeToken: Secret, ): Promise<string> {
return dag
.shadeform(name, shadeToken)
.getVmStatus()
}
getVmIp() 🔗
Print the VM IP
Return Type
String !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET get-vm-ip
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret) string {
return dag.
Shadeform(name, shadeToken).
GetVmIp(ctx)
}
@function
async def example(name: str, shade_token: dagger.Secret, ) -> str:
return await (
dag.shadeform(name, shade_token)
.get_vm_ip()
)
@func()
async example(name: string, shadeToken: Secret, ): Promise<string> {
return dag
.shadeform(name, shadeToken)
.getVmIp()
}
getVmUser() 🔗
Print the VM user to use for SSH connection
Return Type
String !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET get-vm-user
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret) string {
return dag.
Shadeform(name, shadeToken).
GetVmUser(ctx)
}
@function
async def example(name: str, shade_token: dagger.Secret, ) -> str:
return await (
dag.shadeform(name, shade_token)
.get_vm_user()
)
@func()
async example(name: string, shadeToken: Secret, ): Promise<string> {
return dag
.shadeform(name, shadeToken)
.getVmUser()
}
vmReady() 🔗
Wait for VM to be ready and return its ID
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
maxRetries | Integer ! | 10 | No description provided |
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET vm-ready --max-retries integer
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret, maxRetries int) string {
return dag.
Shadeform(name, shadeToken).
VmReady(ctx, maxRetries)
}
@function
async def example(name: str, shade_token: dagger.Secret, max_retries: int) -> str:
return await (
dag.shadeform(name, shade_token)
.vm_ready(max_retries)
)
@func()
async example(name: string, shadeToken: Secret, maxRetries: number): Promise<string> {
return dag
.shadeform(name, shadeToken)
.vmReady(maxRetries)
}
createNcheck() 🔗
Create a VM and wait for its creation to succeed
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cloud | String ! | "hyperstack" | No description provided |
region | String ! | "canada-1" | No description provided |
shadeInstanceType | String ! | "A6000" | No description provided |
shadeCloud | String ! | "true" | No description provided |
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET create-n-check --cloud string --region string --shade-instance-type string --shade-cloud string
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret, cloud string, region string, shadeInstanceType string, shadeCloud string) string {
return dag.
Shadeform(name, shadeToken).
CreateNCheck(ctx, cloud, region, shadeInstanceType, shadeCloud)
}
@function
async def example(name: str, shade_token: dagger.Secret, cloud: str, region: str, shade_instance_type: str, shade_cloud: str) -> str:
return await (
dag.shadeform(name, shade_token)
.create_n_check(cloud, region, shade_instance_type, shade_cloud)
)
@func()
async example(name: string, shadeToken: Secret, cloud: string, region: string, shadeInstanceType: string, shadeCloud: string): Promise<string> {
return dag
.shadeform(name, shadeToken)
.createNCheck(cloud, region, shadeInstanceType, shadeCloud)
}
deleteVm() 🔗
Delete VM
Return Type
String !
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET delete-vm
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret) string {
return dag.
Shadeform(name, shadeToken).
DeleteVm(ctx)
}
@function
async def example(name: str, shade_token: dagger.Secret, ) -> str:
return await (
dag.shadeform(name, shade_token)
.delete_vm()
)
@func()
async example(name: string, shadeToken: Secret, ): Promise<string> {
return dag
.shadeform(name, shadeToken)
.deleteVm()
}
execSshCommand() 🔗
execute the provided through automatic ssh command
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
command | String ! | - | No description provided |
sshKey | File ! | - | A file. |
Example
dagger -m github.com/dciangot/daggerverse/shadeform@b68afdb32e366063d14c0e0569c4bafee7941fa3 call \
--name string --shade-token env:MYSECRET exec-ssh-command --command string --ssh-key file:path
func (m *myModule) example(ctx context.Context, name string, shadeToken *Secret, command string, sshKey *File) string {
return dag.
Shadeform(name, shadeToken).
ExecSshCommand(ctx, command, sshKey)
}
@function
async def example(name: str, shade_token: dagger.Secret, command: str, ssh_key: dagger.File) -> str:
return await (
dag.shadeform(name, shade_token)
.exec_ssh_command(command, ssh_key)
)
@func()
async example(name: string, shadeToken: Secret, command: string, sshKey: File): Promise<string> {
return dag
.shadeform(name, shadeToken)
.execSshCommand(command, sshKey)
}