-
Notifications
You must be signed in to change notification settings - Fork 8.1k
build: cdi manual #23069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: cdi manual #23069
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
5465608 to
4ef0c39
Compare
|
Could you edit this line to ? |
|
Thanks looks good now but do you know why it is happening? Looking at the logs: https://app.netlify.com/projects/docsdocker/deploys/6870f8f33387050008ca7b11 It says cdi page contains |
|
The LST0 issue is the one we had a few weeks ago: it comes from codeblocks that we convert into Base64 for the copy button, so one of your codeblocks contains that string once converted 🙃 |
Ah I see but still wonder why just file-conventions and cdi pages are affected and not others using codeblocks? |
b0fd26d to
3153d21
Compare
I guess just "luck" if the script base64 encodes the content of the codeblock (before styling). |
|
Did a quick check; |
ArthurFlag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff. The troubleshooting in the middle of it will be super useful for AI scrapers 👍
thaJeztah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I started writing some comments that I didn't submit yet 😂
| cdiVersion: "0.6.0" | ||
| kind: "vendor1.com/device" | ||
| devices: | ||
| - name: foo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could use some name like my-device instead of foo (probably also for the filename and env-var)
| GC Policy rule#0: | ||
| All: false | ||
| Filters: type==source.local,type==exec.cachemount,type==source.git.checkout | ||
| Keep Duration: 48h0m0s | ||
| Max Used Space: 658.9MiB | ||
| GC Policy rule#1: | ||
| All: false | ||
| Keep Duration: 1440h0m0s | ||
| Reserved Space: 4.657GiB | ||
| Max Used Space: 953.7MiB | ||
| Min Free Space: 2.794GiB | ||
| GC Policy rule#2: | ||
| All: false | ||
| Reserved Space: 4.657GiB | ||
| Max Used Space: 953.7MiB | ||
| Min Free Space: 2.794GiB | ||
| GC Policy rule#3: | ||
| All: true | ||
| Reserved Space: 4.657GiB | ||
| Max Used Space: 953.7MiB | ||
| Min Free Space: 2.794GiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should omit these in the example output, as they're not really relevant for this manual, e.g.;
| GC Policy rule#0: | |
| All: false | |
| Filters: type==source.local,type==exec.cachemount,type==source.git.checkout | |
| Keep Duration: 48h0m0s | |
| Max Used Space: 658.9MiB | |
| GC Policy rule#1: | |
| All: false | |
| Keep Duration: 1440h0m0s | |
| Reserved Space: 4.657GiB | |
| Max Used Space: 953.7MiB | |
| Min Free Space: 2.794GiB | |
| GC Policy rule#2: | |
| All: false | |
| Reserved Space: 4.657GiB | |
| Max Used Space: 953.7MiB | |
| Min Free Space: 2.794GiB | |
| GC Policy rule#3: | |
| All: true | |
| Reserved Space: 4.657GiB | |
| Max Used Space: 953.7MiB | |
| Min Free Space: 2.794GiB | |
| # ... |
| Now let's create a container builder named `gpubuilder` using Buildx: | ||
|
|
||
| ```console | ||
| $ docker buildx create --name gpubuilder --driver-opt "image=crazymax/buildkit:v0.23.2-ubuntu-nvidia" --bootstrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to have this somewhere more "official" I guess (not a blocker); how complicated is this image to build? Would it be an option to add the Dockerfile here (if it's just 2 .. 3 steps)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will be in the future, this is tracked in moby/buildkit#5944.
Would it be an option to add the
Dockerfilehere (if it's just 2 .. 3 steps)?
It's the BuildKit Dockerfile so not an option 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha! I was hoping it could be some COPY --from=buildkit-bin ... to compose the image, but based on a different base image.
Definitely not a blocker!
| title: Container Device Interface (CDI) | ||
| weight: 60 | ||
| description: Using CDI to access GPUs and other devices in your builds | ||
| keywords: build, buildkit, buildx, guide, tutorial, cdi, device, gpu, nvidia, cuda, amd, rocm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like vale may need to be taught some of these acronyms (nvidia, coda ..) or would it be because they're lowercase here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think keywords should be excluded from Vale analysis or at least don't check casing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to revisit our Vale configuration to include a few more terms to the "allowlist". Yea, excluding metadata could be a good option.
19103b6 to
266606a
Compare
| > [!NOTE] | ||
| > If you are creating a container builder on WSL, you need to ensure that | ||
| > [Docker Desktop](../../desktop/_index.md) is installed and [WSL 2 GPU Paravirtualization](../../desktop/features/gpu.md#prerequisites) | ||
| > is enabled. Buildx v0.26+ is also required to mount the WSL libraries in the | ||
| > container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this section related to docker/buildx#3320
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this part for now as this will happen in the next 0.27 milestone.
Signed-off-by: CrazyMax <[email protected]>
follow-up #23069 (comment) ## Related issues or tickets * docker/buildx#3320 ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review Signed-off-by: CrazyMax <[email protected]>
Description
Adds CDI page to build section.
Related issues or tickets
RUN --gpus ...or equivalent. moby/buildkit#1436Reviews