-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add multi-arch support for nvidia-device-plugin #422
base: master
Are you sure you want to change the base?
Add multi-arch support for nvidia-device-plugin #422
Conversation
* update Dockerfile to cross-build on arm * update Makefile to use buildx with `--platforms` arg
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.
LGTM in general.
WORKDIR /go/src/github.com/GoogleCloudPlatform/container-engine-accelerators | ||
COPY . . | ||
RUN go build cmd/nvidia_gpu/nvidia_gpu.go | ||
RUN if [ "${TARGETARCH}" = "arm64" ] && [ "${BUILDARCH}" != "arm64" ]; then \ |
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.
can we double check the conditions here? Is it assuming the build machine is on X86?
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 the current build machine is x86. These conditions are ensuring that we only install the cross-compiler if the host machine is x86 AND we are building for arm. It may be a good point to ensure that the host machine is nothing other than x86 or arm though, if that is what you were getting at?
apt install -yq --no-install-recommends \ | ||
gcc-aarch64-linux-gnu libc6-dev-arm64-cross; \ | ||
CC=aarch64-linux-gnu-gcc; \ | ||
fi && \ |
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.
This dockerfile is used to internally build image for release, also need to double check if the currently louhi pipeline can work successfully after this update.
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, currently the Louhi pipeline runs make container.
Locally make container
performs the exact same as before, only using the dockerx wrapper around docker -- as we are using an amd64 machine to build an amd64 image (thus will not activate this cross-complier install). For actually building the multi-arch build in louhi, I separated out that build into a different make command. I will create a seperate louhi flow to verify that works before proceeding with changing the pipeline.
LGTMed. Please ensure existing path will not be broken. |
--platforms
arg