gpu
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@395e02e40040fa6799f56eea2eb9f8da00620406
Entrypoint
Return Type
Gpu
Example
dagger -m github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@395e02e40040fa6799f56eea2eb9f8da00620406 call \
func (m *myModule) example() *Gpu {
return dag.
Gpu()
}
@function
def example() -> dag.Gpu:
return (
dag.gpu()
)
@func()
example(): Gpu {
return dag
.gpu()
}
Types
Gpu 🔗
deployDaggerOnFly() 🔗
Returns lines that match a pattern in the files of the provided Directory Once deployed, in order to point to the new remote engine: export _EXPERIMENTAL_DAGGER_RUNNER_HOST=tcp://.internal:2345
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
Example
dagger -m github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@395e02e40040fa6799f56eea2eb9f8da00620406 call \
deploy-dagger-on-fly --token env:MYSECRET
func (m *myModule) example(ctx context.Context, token *Secret) string {
return dag.
Gpu().
DeployDaggerOnFly(ctx, token)
}
@function
async def example(token: dagger.Secret) -> str:
return await (
dag.gpu()
.deploy_dagger_on_fly(token)
)
@func()
async example(token: Secret): Promise<string> {
return dag
.gpu()
.deployDaggerOnFly(token)
}
testCuda() 🔗
TestCuda tests if it can access the GPU, requires a machine with an NVIDIA GPU
Return Type
String !
Example
dagger -m github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@395e02e40040fa6799f56eea2eb9f8da00620406 call \
test-cuda
func (m *myModule) example(ctx context.Context) string {
return dag.
Gpu().
TestCuda(ctx)
}
@function
async def example() -> str:
return await (
dag.gpu()
.test_cuda()
)
@func()
async example(): Promise<string> {
return dag
.gpu()
.testCuda()
}
cuda() 🔗
Return Type
Container !
Example
dagger -m github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@395e02e40040fa6799f56eea2eb9f8da00620406 call \
cuda
func (m *myModule) example() *Container {
return dag.
Gpu().
Cuda()
}
@function
def example() -> dagger.Container:
return (
dag.gpu()
.cuda()
)
@func()
example(): Container {
return dag
.gpu()
.cuda()
}