You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Containers run by Dagger can't access their machine's GPUs. This makes using Dagger impractical for some pipelines that would otherwise be a great fit: video encoding, ML inference, training, etc.
The first thing that I'll try is to refactor my encoding/inference containers so that they can work on stdio, which should let me run them as "host containers" through a bind-mounted Docker socket, which should be (fairly?) easy in dagger (if I'm not mistaken).
The second thing would be to perhaps see if I can somehow... inject the nvidia container runtime in the buildkit container and convince buildkit to use it? Hmm. That might be tricky 😅
(Also, just to give you a bit of context: currently, my workflow revolves around a big "data" directory which is shared by all the stages of the pipeline - speech recognition, OCR, barcode detection, video transcoding... Each "job" is approximately 5-10 GB of input data + 5-10 GB of output data + 5-10 GB of intermediary files. In a perfect world, this would be all stored in an object store and each stage would get data / process / put data; and once the pipeline is prod-ready, this is probably what will happen; but for the time being, working on local files saves a ton of time - especially since getting/pushing 5 GB from my local machine each time I want to do a round of testing isn't great 😅)
I guess some stuff like running machine learning models, transcoding, rendering etc could be a use case.
You could setup a pipeline to take in assets run them through blender, or do some training with it.
That said, this is definitely a niche use-case =D
I've previously used either the nvidia container runtime (now deprecated, it just seemed to have been moved) and now the built in support in linux (in docker itself, or probably containerd).
That said you probably could docker-in-docker it =D
Spin up a helper container which runs the nvidia-runtime and mounts the required cards, or forwards sockets. You would pay a penalty performance wise, but it would probably work :) ref: NVIDIA/nvidia-container-runtime#92 someone has gotten it to work.
Yeah my understanding of existing GPU support for containers is that it mostly amounts to on-the-fly modifications of the oci runtime config for the container (mount in certain devices, config files and shared libs that are host/gpu-version specific, etc.).
Dagger already has its own shim inserted between buildkit and runc for that exact same purpose of modifying the oci runtime config on the fly, so that would be the perfect place to start with adding gpu hooks. We can then look into upstreaming this to buildkit.
The more annoying part of this is that the dagger engine is itself a docker container by default, isolated from the host. It should already have access to the device files of the host since it runs w/ --privileged, but it will also need access to the rest of the possible files. The choice might be between:
Unconditionally always running the engine w/ flags that give it access to anything it might need (nvidia, amd, intel, etc.)
Making this a configuration knob for spinning up the engine that the user has to be aware of and set
Something like what @kjuulh suggested where the gpu is served over a socket rather than mounted into the container (IIUC, I didn't even know that was possible, quite cool if so!)
My immediate instinct is that 1. is preferable but I don't know yet how feasible it is, a little bit more research needed. Either way this should be possible.
@shykes to answer your question, I think this is probably in the "medium" category. There's lots of prior art and we have all the hook points setup to support this, just need to figure out some of the details to get it working smoothly for all use cases.
Use Case: My team develops GPU based data compression libraries (among other things) while building them can be done with stubs, testing them requires actual GPUs.
Unconditionally always running the engine w/ flags that give it access to anything it might need (nvidia, amd, intel, etc.)
From what I understand from @sipsma's comment here, the dagger scheme could auto add the right flags when gpu(s) are detected on the host. And given that we run in privileged mode, it seems acceptable. That way, we would not need an extra config to pass to the pipeline anytime it requires gpu access, it would work transparently.
For anyone following this thread, @lukemarsden will demo using Dagger with an MLOps use case at the next community call (June 29th). He is working on a workaround for GPU support that you can use until this issue is completed. Register below before you forget ;)
Following up with the first idea for basic GPU access. I've spent some time exploring the implementation details around Docker and trying to modify Dagger to follow a similar approach:
In Docker initialization happens around nvidia_linux which it's invoked as soon as the daemon starts. Attempts to resolve the path for nvidia-container-runtime-hook (typically found in /usr/bin).
If the hook binary is found on the current path: (i) a capabilities set is initialized and (ii) registerDeviceDriver is called taking the capabitilies set and a function called setNvidiaGPUs.
setNvidiaGPUs initializes environment variables (NVIDIA_VISIBLE_DEVICES, NVIDIA_DRIVER_CAPABILITIES) and attaches a prestart hook to the runtime spec, pointing to the nvidia-container-runtime-hook binary. Note: Even though prestart hooks look deprecated seems is still very much in use, even in Docker's implementation.
setNvidiaGPUs is actually called when WithDevices is used, HostDevices/WithHostDevices is used to populate the host devices on the runtime spec. A container.DeviceRequest is constructed and passed to the previously registered setNvidiaGPUs hook.
Spec for a container that's using gpus=all in Docker contains the following block (full spec in case there's some other relevant info here):
To summarize: initial detection of the presence of the NV container hook is performed on the host when daemon starts. Later a hook is registered to modify the runtime spec, this initializes environment variables and ends up calling the NV container hook. Still unsure on the exact step where WithDevices is called to trigger this logic.
On the Dagger side I did some hacking around the following ideas:
If we want to follow a similar approach we might need to add some host initialization function on the engine code. For now I've tweaked mage code so that the NV hook is always accessible, doing something like:
Seems that we need some implementation to cover the host device logic first, so I'm going around that for now.
Testing scenario is as follows:
GPU-enabled instance in Paperspace (Quadro M4000).
Built Docker from source and ran the following command multiple lines while debugging logic: docker run -it --gpus all nvidia/cuda:11.4.0-base-ubuntu20.04 nvidia-smi.
On the Dagger side, created a test that look as follows (core/integration/gpu_test.go) to inspect the flow:
However I'm not yet able to make Dagger resemble the above behavior. Here's some code and notes:
Not optimal but useful for testing: first mage copies Nvidia dependencies from the host to the dev engine container.
Then we attempt to override the config.json with a minimal one like in runc-nvidia-test. rootfs path is taken from the original config.json.
To test:
Run ./hack/dev bash.
Run go test -v -count 1 -timeout 30s -run=TestGPUExperiment ./core/integration:
paperspace@psal6i8au:~/go/src/github.com/dagger/dagger$ go test -v -count 1 -timeout 1000s -run=TestGPUExperiment ./core/integration
=== RUN TestGPUExperiment
ctr: &{q:0xc00042e580 c:{Client:0xc0004b0ff0} endpoint:<nil> envVariable:<nil> exitCode:<nil> export:<nil> hostname:<nil> id:<nil> imageRef:<nil> label:<nil> platform:<nil> publish:<nil> stderr:<nil> stdout:<nil> sync:<nil> user:<nil> workdir:<nil>}
gpu_test.go:27:
Error Trace: /home/paperspace/go/src/github.com/dagger/dagger/core/integration/gpu_test.go:27
Error: Received unexpected error:
input:1: container.from.withExec.stdout process "ls /" did not complete successfully: exit code: 1
Stdout:
Stderr:
runc run failed: unable to start container process: error during container init: error running hook #0: fork/exec /usr/bin/nvidia-container-runtime-hook: no such file or directory
Please visit https://dagger.io/help#go for troubleshooting guidance.
Test: TestGPUExperiment
--- FAIL: TestGPUExperiment (4.39s)
FAIL
FAIL github.com/dagger/dagger/core/integration 4.411s
FAIL
Guessing this behavior is caused by differences between runc container creation happening on dev engine vs container creation on the host. Still debugging possible causes.
I've found that using Alpine as the Dagger's base image (Alpine uses musl and Nvidia tooling depends on glibc) for the engine causes a lot of issues. There's a relevant ticket here: NVIDIA/nvidia-container-runtime#53
Besides what's mentioned in the ticket I've found that gcompat and a combination of other Alpine compatibility packages result in a workaround and have managed to run some of the Nvidia tooling with Alpine:
$ apk add gcompat libc6-compat
$ export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
$ nvidia-smi # works fine
Some interesting points:
Should Dagger consider switching to Ubuntu base images for compatibility for scenarios like this? If workarounds like the above work fine we could still keep Alpine around and ship those compat packages by default and/or enable those packages only when GPU access is required, etc.
At the same time this might be a very specific scenario. The Nvidia hook is invoked by runc before the container is started so it runs on the host -Alpine- and not in the newly created container that has an Ubuntu base image nvidia/cuda:11.4.0-base-ubuntu20.04 which is what I've been testing on. This scenario is probably not a common one.
I'm still going through shim adjustments to see if we can run this tooling inside the Dagger pipeline. It was useful to explore the scenario in this way so that we can get a notion of what this hook does, what files are required, etc.
I was finally able to get the hook running properly, the code is in this branch. I've added a quick integration test that queries GPUs in both the host and the Dagger container, then ensures that we're getting the same output:
package core
import (
"context""os/exec""testing""dagger.io/dagger""github.com/stretchr/testify/require"
)
funcTestGPUAccess(t*testing.T) {
ctx:=context.Background()
c, err:=dagger.Connect(ctx)
require.NoError(t, err)
deferc.Close()
// Query nvidia-smi on the host:hostCmd:=exec.Command("nvidia-smi", "-L")
hostOutput, err:=hostCmd.Output()
require.NoError(t, err)
require.NotEmpty(t, hostOutput)
// Query the same on the Dagger container and compare output:ctr:=c.Container().From("nvidia/cuda:11.7.0-base-ubuntu20.04")
contents, err:=ctr.
WithExec([]string{"nvidia-smi", "-L"}).
Stdout(ctx)
require.NoError(t, err)
require.Equal(t, string(hostOutput), contents)
}
Summary:
Replaced dev engine base image with Ubuntu so that we can overcome glibc vs musl issues related to Alpine.
Added some dirty mounts at engine initialization and shim level to inject host dependencies like shared libraries, etc. I'm wandering if it's possible to improve this part so will be researching more about runc.
Replaced dev engine base image with Ubuntu so that we can overcome glibc vs musl issues related to Alpine.
This SGTM, but it would also be nice to do a quick experiment with using cgr.dev/chainguard/wolfi-base:latest, which has apk as we were previously using but also uses glibc and is smaller than the ubuntu:latest image (wolfi-base is 10MB unpacked, ubuntu is 69MB).
If it doesn't work for whatever reason, no biggie, we can optimize in the future.
Added some dirty mounts at engine initialization and shim level to inject host dependencies like shared libraries, etc. I'm wandering if it's possible to improve this part so will be researching more about runc.
Do you think for the "autoprovisioned" engine in docker (i.e. here), we could instead just pass the --gpus all flag to docker run? I thought that would create the same result as what you did, but could be missing something.
We should be able to pass NVIDIA_VISIBLE_DEVICES at spec level in order to trigger a behavior similar to the --gpus flag.
Is this a different behavior than the docker --gpu arg? I would assume that it's a better UX to disable the driver capability by default and enable it only if a call like .WithGPU(<arg>) is passed. At the very least, it's important to be able to control the GPU visibility.
We should be able to pass NVIDIA_VISIBLE_DEVICES at spec level in order to trigger a behavior similar to the --gpus flag.
Is this a different behavior than the docker --gpu arg? I would assume that it's a better UX to disable the driver capability by default and enable it only if a call like .WithGPU(<arg>) is passed. At the very least, it's important to be able to control the GPU visibility.
I've spent the past weeks polishing the code and digging deeper into multi GPU scenarios (e7e16f2697d9590d2e191af8073fc0f37b6b05f9). The latest commits in this branch include:
WithGPU support with the underlying logic to pass the appropriate parameters to shim.
shim changes to inject the environment variables expected by Nvidia.
SDK changes to support WithGPU.
Bumped the CUDA image that we were previously using as support for it was dropped -image was removed from DockerHub-.
Rebased everything and fixed conflicts to keep up with latest main.
Extended GPU tests to cover the above functionality:
package core
import (
"context""os/exec""regexp""strings""testing""dagger.io/dagger""github.com/stretchr/testify/require"
)
const (
cudaImage="nvidia/cuda:11.7.1-base-ubuntu20.04"
)
var (
// uuidRegex is used to match GPU UUID in nvidia-smi output:uuidRegex=regexp.MustCompile(`GPU-\w{8}-\w{4}-\w{4}-\w{4}-\w{12}`)
)
funcTestGPUAccess(t*testing.T) {
ctx:=context.Background()
c, err:=dagger.Connect(ctx)
require.NoError(t, err)
deferc.Close()
// Query nvidia-smi on the host:hostNvidiaCmd:=exec.Command("nvidia-smi", "-L")
hostNvidiaOutput, err:=hostNvidiaCmd.Output()
hostNvidiaOutputStr:=string(hostNvidiaOutput)
require.NoError(t, err)
require.NotEmpty(t, hostNvidiaOutput)
// Query the same on the Dagger container and compare output:ctr:=c.Container().From(cudaImage)
contents, err:=ctr.
// WithGPU(dagger.ContainerWithGPUOpts{Devices: "GPU-5d8950fe-17a6-2fa7-9baa-afa83bba0e2b"}).WithGPU(dagger.ContainerWithGPUOpts{Devices: "all"}).
WithExec([]string{"nvidia-smi", "-L"}).
Stdout(ctx)
require.NoError(t, err)
require.Equal(t, hostNvidiaOutputStr, contents)
t.Run("use specific GPU", func(t*testing.T) {
vargpus []string// Take host output and get GPU IDs:for_, ln:=rangestrings.Split(hostNvidiaOutputStr, "\n") {
matches:=uuidRegex.FindAllString(ln, 1)
iflen(matches) ==0 {
continue
}
gpus=append(gpus, matches[0])
}
iflen(gpus) <=1 {
t.Fatal("this test requires at least 2 GPUs to run")
}
// Pick first GPU and initialize a Dagger container for it:ctr:=c.Container().From(cudaImage)
contents, err:=ctr.
WithGPU(dagger.ContainerWithGPUOpts{Devices: gpus[0]}).
WithExec([]string{"nvidia-smi", "-L"}).
Stdout(ctx)
require.NoError(t, err)
// Assert that only the first GPU is present in the output// and ensure none of the other GPUs are:require.Contains(t, contents, gpus[0])
for_, gpu:=rangegpus[1:] {
require.NotContains(t, contents, gpu)
}
})
}
I did some experimentation around these topics too:
Autoprovisioning the Dagger engine initial run with GPU flags: I think this didn't ressemble the behavior we're trying to achieve here (enabling access to specific GPUs on the Dagger engine container isn't the same as enabling access to GPUs on the runc spawned containers during pipeline execution). Happy to discuss further now that I know more about the internals.
wolfi-base didn't work out of the box, need to dig deeper. @sipsma
Missing items to solve:
Can we avoid mounting all Nvidia dependencies -or at least simplify it and mount less stuff- from the host into the container? What about CUDA versions? E.g. host is running Cuda 11.6, container is running Cuda 11.7. May sound confusing but it's related to the fact that the hook runs in a specific environment before the container starts.
Current hack/dev is running with export _EXPERIMENTAL_DAGGER_SERVICES_DNS=0 as this feature seems broken with Ubuntu, we need to either fix the issue or continue testing wolfi-base to see if it's a better fit.
For those of you following this issue, @matiasinsaurralde will join us again on September 7th during the Dagger Community call to share the latest updates on GPU access.
Activity
shykes commentedon Mar 1, 2023
This is a requirement for @jpetazzo :)
shykes commentedon Mar 1, 2023
Thoughts @sipsma @vito @aluzzardi ? Is this a small / medium / large?
jpetazzo commentedon Mar 1, 2023
..ooOO( Thinking out loud )
The first thing that I'll try is to refactor my encoding/inference containers so that they can work on stdio, which should let me run them as "host containers" through a bind-mounted Docker socket, which should be (fairly?) easy in dagger (if I'm not mistaken).
The second thing would be to perhaps see if I can somehow... inject the nvidia container runtime in the buildkit container and convince buildkit to use it? Hmm. That might be tricky 😅
(Also, just to give you a bit of context: currently, my workflow revolves around a big "data" directory which is shared by all the stages of the pipeline - speech recognition, OCR, barcode detection, video transcoding... Each "job" is approximately 5-10 GB of input data + 5-10 GB of output data + 5-10 GB of intermediary files. In a perfect world, this would be all stored in an object store and each stage would get data / process / put data; and once the pipeline is prod-ready, this is probably what will happen; but for the time being, working on local files saves a ton of time - especially since getting/pushing 5 GB from my local machine each time I want to do a round of testing isn't great 😅)
kjuulh commentedon Mar 1, 2023
I guess some stuff like running machine learning models, transcoding, rendering etc could be a use case.
You could setup a pipeline to take in assets run them through blender, or do some training with it.
That said, this is definitely a niche use-case =D
I've previously used either the nvidia container runtime (
now deprecated, it just seemed to have been moved) and now the built in support in linux (in docker itself, or probably containerd).That said you probably could docker-in-docker it =D
Spin up a helper container which runs the nvidia-runtime and mounts the required cards, or forwards sockets. You would pay a penalty performance wise, but it would probably work :) ref: NVIDIA/nvidia-container-runtime#92 someone has gotten it to work.
sipsma commentedon Mar 1, 2023
Yeah my understanding of existing GPU support for containers is that it mostly amounts to on-the-fly modifications of the oci runtime config for the container (mount in certain devices, config files and shared libs that are host/gpu-version specific, etc.).
Dagger already has its own shim inserted between buildkit and runc for that exact same purpose of modifying the oci runtime config on the fly, so that would be the perfect place to start with adding gpu hooks. We can then look into upstreaming this to buildkit.
The more annoying part of this is that the dagger engine is itself a docker container by default, isolated from the host. It should already have access to the device files of the host since it runs w/
--privileged, but it will also need access to the rest of the possible files. The choice might be between:My immediate instinct is that
1.is preferable but I don't know yet how feasible it is, a little bit more research needed. Either way this should be possible.@shykes to answer your question, I think this is probably in the "medium" category. There's lots of prior art and we have all the hook points setup to support this, just need to figure out some of the details to get it working smoothly for all use cases.
robertu94 commentedon Mar 2, 2023
Use Case: My team develops GPU based data compression libraries (among other things) while building them can be done with stubs, testing them requires actual GPUs.
robertu94 commentedon Mar 2, 2023
For what it's worth there is a standard API for adding GPU devices across vendors already supported with containerd, docker, and podman https://github.com/container-orchestrated-devices/container-device-interface. I guess you just need provide a method to pass a the equivalent of a
--deviceflag.Before this, with Podman, it just used a hook in the OCI hooks directory.
mircubed commentedon Mar 6, 2023
related to #4684
mircubed commentedon Apr 26, 2023
mentioned the need for GPU access in this blog post - https://robertu94.github.io/2023/04/24/refactoring-ci/cd-for-a-moderately-large-c-code-base.html cc @gerhard
gerhard commentedon May 9, 2023
What are your thoughts on this @lukemarsden?
samalba commentedon Jun 2, 2023
From what I understand from @sipsma's comment here, the dagger scheme could auto add the right flags when gpu(s) are detected on the host. And given that we run in privileged mode, it seems acceptable. That way, we would not need an extra config to pass to the pipeline anytime it requires gpu access, it would work transparently.
tfcace commentedon Jun 14, 2023
Our ML pipeline will greatly benefit from this.
mircubed commentedon Jun 15, 2023
For anyone following this thread, @lukemarsden will demo using Dagger with an MLOps use case at the next community call (June 29th). He is working on a workaround for GPU support that you can use until this issue is completed. Register below before you forget ;)
Register here: https://dagger-io.zoom.us/webinar/register/3916868482633/WN_USQjVBGXT0SWhNMvqYVvCA
6 remaining items
matiasinsaurralde commentedon Jun 20, 2023
Following up with the first idea for basic GPU access. I've spent some time exploring the implementation details around Docker and trying to modify Dagger to follow a similar approach:
nvidia_linuxwhich it's invoked as soon as the daemon starts. Attempts to resolve the path fornvidia-container-runtime-hook(typically found in/usr/bin).registerDeviceDriveris called taking the capabitilies set and a function calledsetNvidiaGPUs.setNvidiaGPUsinitializes environment variables (NVIDIA_VISIBLE_DEVICES,NVIDIA_DRIVER_CAPABILITIES) and attaches aprestarthook to the runtime spec, pointing to thenvidia-container-runtime-hookbinary.Note: Even though
prestarthooks look deprecated seems is still very much in use, even in Docker's implementation.setNvidiaGPUsis actually called whenWithDevicesis used,HostDevices/WithHostDevicesis used to populate the host devices on the runtime spec. Acontainer.DeviceRequestis constructed and passed to the previously registeredsetNvidiaGPUshook.gpus=allin Docker contains the following block (full spec in case there's some other relevant info here):gpus=0:WithDevicesis called to trigger this logic.On the Dagger side I did some hacking around the following ideas:
nvidia-container-runtime-hookis available from thesetupBundle-where the runtime spec is built-.Testing scenario is as follows:
docker run -it --gpus all nvidia/cuda:11.4.0-base-ubuntu20.04 nvidia-smi.core/integration/gpu_test.go) to inspect the flow:matiasinsaurralde commentedon Jun 21, 2023
I've been experimenting with
runcand wrapped up this repo with the minimal requirements to get this working: https://github.com/matiasinsaurralde/runc-nvidia-testHowever I'm not yet able to make Dagger resemble the above behavior. Here's some code and notes:
config.jsonwith a minimal one like inrunc-nvidia-test.rootfspath is taken from the originalconfig.json.To test:
./hack/dev bash.go test -v -count 1 -timeout 30s -run=TestGPUExperiment ./core/integration:runccontainer creation happening on dev engine vs container creation on the host. Still debugging possible causes.matiasinsaurralde commentedon Jun 27, 2023
I've found that using Alpine as the Dagger's base image (Alpine uses
musland Nvidia tooling depends onglibc) for the engine causes a lot of issues. There's a relevant ticket here: NVIDIA/nvidia-container-runtime#53Another related ticket: NVIDIA/nvidia-container-toolkit#71
Besides what's mentioned in the ticket I've found that
gcompatand a combination of other Alpine compatibility packages result in a workaround and have managed to run some of the Nvidia tooling with Alpine:Some interesting points:
runcbefore the container is started so it runs on the host -Alpine- and not in the newly created container that has an Ubuntu base imagenvidia/cuda:11.4.0-base-ubuntu20.04which is what I've been testing on. This scenario is probably not a common one.matiasinsaurralde commentedon Jun 28, 2023
I was finally able to get the hook running properly, the code is in this branch. I've added a quick integration test that queries GPUs in both the host and the Dagger container, then ensures that we're getting the same output:
Summary:
glibcvsmuslissues related to Alpine.runc.nvidia-container-clisubcommands return capability errors so I will look into my standaloneruncspec to see if there's something that can be taken from it. Cap errors are reported here too: How to use the runtime hook for rootless RunC containers? NVIDIA/libnvidia-container#49NVIDIA_VISIBLE_DEVICESat spec level in order to trigger a behavior similar to the--gpusflag.sipsma commentedon Jun 28, 2023
This is great @matiasinsaurralde! Very exciting to see this working.
This SGTM, but it would also be nice to do a quick experiment with using
cgr.dev/chainguard/wolfi-base:latest, which hasapkas we were previously using but also uses glibc and is smaller than theubuntu:latestimage (wolfi-baseis 10MB unpacked,ubuntuis 69MB).If it doesn't work for whatever reason, no biggie, we can optimize in the future.
Do you think for the "autoprovisioned" engine in docker (i.e. here), we could instead just pass the
--gpus allflag todocker run? I thought that would create the same result as what you did, but could be missing something.samalba commentedon Jun 28, 2023
Is this a different behavior than the docker
--gpuarg? I would assume that it's a better UX to disable the driver capability by default and enable it only if a call like.WithGPU(<arg>)is passed. At the very least, it's important to be able to control the GPU visibility.matiasinsaurralde commentedon Jun 28, 2023
@samalba Same behavior, basically Docker sets the value of that environment variable based on GPUs that were specified with the CLI flag: https://github.com/moby/moby/blob/master/daemon/nvidia_linux.go#L54
mircubed commentedon Jun 29, 2023
Thanks for the update at the community call @matiasinsaurralde! For anyone that missed it, you can check out the recording here and add any additional questions that you might have in the demo thread - https://discord.com/channels/707636530424053791/1124096404063789229/1124096404063789229
(you will need to join the Dagger Discord to view the thread)
matiasinsaurralde commentedon Jul 24, 2023
I've spent the past weeks polishing the code and digging deeper into multi GPU scenarios (e7e16f2697d9590d2e191af8073fc0f37b6b05f9). The latest commits in this branch include:
WithGPUsupport with the underlying logic to pass the appropriate parameters to shim.WithGPU.main.I did some experimentation around these topics too:
runcspawned containers during pipeline execution). Happy to discuss further now that I know more about the internals.wolfi-basedidn't work out of the box, need to dig deeper. @sipsmaMissing items to solve:
hack/devis running withexport _EXPERIMENTAL_DAGGER_SERVICES_DNS=0as this feature seems broken with Ubuntu, we need to either fix the issue or continue testingwolfi-baseto see if it's a better fit.mircubed commentedon Aug 24, 2023
For those of you following this issue, @matiasinsaurralde will join us again on September 7th during the Dagger Community call to share the latest updates on GPU access.
You can register here: https://dagger-io.zoom.us/webinar/register/4416686668409/WN_USQjVBGXT0SWhNMvqYVvCA#/registration
mircubed commentedon Sep 13, 2023
If anyone would like an update on this issue, I suggest watching @matiasinsaurralde latest update from the community call - https://youtu.be/n9fBSChDvVY
matiasinsaurralde commentedon Sep 20, 2023
For anyone following this issue, here's the latest (service containers usage fixed, improved SDK calls, added some Pytoch tests): #5605 (comment)
mircubed commentedon Nov 27, 2023
@samalba @matiasinsaurralde should we close this issue now that the PR is merged?
gerhard commentedon Dec 7, 2023
Yes! Thank you for mentioning @mircubed, closing now.