Dagger
Search

gpu

This module has been generated via dagger init and serves as a reference to
basic 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@e5a3d7f6394b47438005c1a5167fcfcc5120cba2

Entrypoint

Return Type
Gpu
Example
dagger -m github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@e5a3d7f6394b47438005c1a5167fcfcc5120cba2 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
NameTypeDefault ValueDescription
tokenSecret !-No description provided
Example
dagger -m github.com/rajatjindal/samalba-dagger-modules/nvidia-gpu@e5a3d7f6394b47438005c1a5167fcfcc5120cba2 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@e5a3d7f6394b47438005c1a5167fcfcc5120cba2 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()
}