Skip to content

dagrr: add support for GPU deployments - #4

Merged
gerhard merged 8 commits into
gerhard:mainfrom
samalba:daggr-gpu
Dec 3, 2024
Merged

gerhard merged 8 commits into
gerhard:mainfrom
samalba:daggr-gpu

Conversation

@samalba

@samalba samalba commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

@gerhard

gerhard commented Nov 21, 2024 •

Copy link
Copy Markdown
Owner

Looking good @samalba 😎 The nice thing about this runtime - Fly.io - is that the Engine image boots with the NVIDIA device already mounted, so no extra mount config is needed.

Any reason why you are not using the GPU variants of the Engine image? I am wondering if the GPU variants fails the same way, i.e. v0.14.0-gpu & v0.14.0-wolfi-gpu

Comment thread dagrr/fly.go Outdated
[[vm]]
size = "%s"
`, m.Dagrr.App, m.Dagrr.Version, disk, size)
`, m.Dagrr.App, primaryRegion, envVars, m.Dagrr.Version, disk, size)

@jedevc jedevc Nov 21, 2024 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is setting up the wrong engine image. We need the -gpu variant suffixed to m.Dagrr.Version:

Suggested change
`, m.Dagrr.App, primaryRegion, envVars, m.Dagrr.Version, disk, size)
`, m.Dagrr.App, primaryRegion, envVars, m.Dagrr.Version + "-gpu", disk, size)

As suggested by @gerhard in #4 (comment).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this change, but only when setting a "gpu kind". We want to standard engine image to be used when no need for a gpu.

@samalba

samalba commented Nov 21, 2024 •

Copy link
Copy Markdown
Contributor Author

Any reason why you are not using the GPU variants of the Engine image? I am wondering if the GPU variants fails the same way, i.e. v0.14.0-gpu & v0.14.0-wolfi-gpu

Submitted a fix in commit cf89db5

By the way, I thought the whole purpose of setting the env var _EXPERIMENTAL_DAGGER_GPU_SUPPORT on the engine was to select the -gpu image when the CLI starts the engine? I guess it does not apply to fly given the image isn't controller by the CLI.

@samalba

samalba commented Dec 3, 2024

Copy link
Copy Markdown
Contributor Author

Added few more things to the PRs. In particular it's now possible to call Destroy() on a OnFlyIo instance, to bring down the remote engine after some tests.

@gerhard gerhard changed the title dagrr: adds support for GPU dagrr: add support for GPU deployments Dec 3, 2024
Run them with:

    just dagrr

This ensures that 95% of the flags work as expected and the right
operations are happening behind the scenes. Meant to be run locally, and
results validated by a human. Running this in CI will be problematic
since contributions come via PRs, and they will **NOT** have access to
credentials such as the `FLY_API_TOKEN`. This works for now!

Signed-off-by: Gerhard Lazu <[email protected]>
@gerhard

gerhard commented Dec 3, 2024

Copy link
Copy Markdown
Owner

I just tested this and it works as advertised:

gerhard-daggerverse-pr-4.mp4

Merging & cutting a new release now.

Thank you @samalba 🤟

@gerhard
gerhard merged commit 01a08d3 into gerhard:main Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants