Skip to content
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

CDI support #4056

Merged
merged 23 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ca49048
buildkitd: cdi config
crazy-max Oct 9, 2024
319bf56
exec: cdi device support
crazy-max Oct 9, 2024
0fe26ed
dockerfile: device support with frontend attribute
crazy-max Oct 9, 2024
f5c38aa
dockerfile: device flag support
crazy-max Oct 9, 2024
33f2164
buildkitd: update default cdi spec dirs
crazy-max Oct 9, 2024
17f46d1
worker: cdi manager
crazy-max Oct 9, 2024
9b39b0d
allow listing devices
tonistiigi Oct 9, 2024
0f24e35
check CDI device error on startup
tonistiigi Oct 10, 2024
3adcf53
enable CDI by default for buildkitd
tonistiigi Oct 10, 2024
f7f1774
cdi: fixes since enabled by default
crazy-max Feb 3, 2025
d69cc70
cdi: use worker cdi manager when generating devices oci spec
crazy-max Feb 4, 2025
943c3ad
dockerfile: move cdi run device to labs
crazy-max Feb 3, 2025
6667434
cdi: support optional devices
crazy-max Feb 5, 2025
3cb3f68
dockerfile: support optional cdi devices
crazy-max Feb 5, 2025
f61e01c
llbsolver: on-demand CDI devices with automatic setup
tonistiigi Feb 10, 2025
54c73d1
contrib: add on demand setup for nvidia cdi
tonistiigi Feb 11, 2025
cdcb1f1
contrib: remove unused code from nvidia setup
tonistiigi Feb 11, 2025
037252b
contrib: add setup definition for virtio-venus device
tonistiigi Feb 11, 2025
a83a253
contrib: fix build with venus
crazy-max Feb 11, 2025
88509a9
dockerfile: remove device frontend attr support
crazy-max Feb 11, 2025
3c072dc
cdi: support custom and wildcard class for injection
crazy-max Feb 11, 2025
06abbdf
cdi: merge spec and device annotations
crazy-max Feb 11, 2025
60d305d
cdi: docs
crazy-max Feb 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ARG GO_VERSION=1.23
ARG ALPINE_VERSION=3.21
ARG XX_VERSION=1.6.1
ARG BUILDKIT_DEBUG
ARG EXPORT_BASE=alpine

# minio for s3 integration tests
FROM minio/minio:${MINIO_VERSION} AS minio
Expand Down Expand Up @@ -194,12 +195,28 @@ RUN --mount=from=binaries \
FROM scratch AS release
COPY --link --from=releaser /out/ /

FROM alpine:${ALPINE_VERSION} AS buildkit-export
FROM alpine:${ALPINE_VERSION} AS buildkit-export-alpine
RUN apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \
&& ln -s fusermount3 /usr/bin/fusermount
COPY --link examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/
VOLUME /var/lib/buildkit

FROM ubuntu:24.04 AS buildkit-export-ubuntu
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
fuse3 \
git \
openssh-client \
pigz \
xz-utils \
iptables \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --link examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/
VOLUME /var/lib/buildkit

FROM buildkit-export-${EXPORT_BASE} AS buildkit-export

FROM gobuild-base AS containerd-build
WORKDIR /go/src/github.com/containerd/containerd
ARG TARGETPLATFORM
Expand Down
181 changes: 141 additions & 40 deletions api/types/worker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions api/types/worker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ message WorkerRecord {
repeated pb.Platform platforms = 3;
repeated GCPolicy GCPolicy = 4;
BuildkitVersion BuildkitVersion = 5;
repeated CDIDevice CDIDevices = 6;
}

message GCPolicy {
Expand All @@ -30,3 +31,10 @@ message BuildkitVersion {
string version = 2;
string revision = 3;
}

message CDIDevice {
string Name = 1;
bool AutoAllow = 2;
map<string, string> Annotations = 3;
bool OnDemand = 4;
}
Loading