only install on supported archs
parent
dc47af631d
commit
2446584e90
|
@ -1456,6 +1456,9 @@ func validateGPUs(value, drvName, rtime string) error {
|
|||
if value == "" {
|
||||
return nil
|
||||
}
|
||||
if err := validateGPUsArch(); err != nil {
|
||||
return err
|
||||
}
|
||||
if value != "nvidia" && value != "all" {
|
||||
return errors.Errorf(`The gpus flag must be passed a value of "nvidia" or "all"`)
|
||||
}
|
||||
|
@ -1465,6 +1468,14 @@ func validateGPUs(value, drvName, rtime string) error {
|
|||
return errors.Errorf("The gpus flag can only be used with the docker driver and docker container-runtime")
|
||||
}
|
||||
|
||||
func validateGPUsArch() error {
|
||||
switch runtime.GOARCH {
|
||||
case "amd64", "arm64", "ppc64le":
|
||||
return nil
|
||||
}
|
||||
return errors.Errorf("The GPUs flag is only supported on amd64, arm64 & ppc64le, currently using %s", runtime.GOARCH)
|
||||
}
|
||||
|
||||
func getContainerRuntime(old *config.ClusterConfig) string {
|
||||
paramRuntime := viper.GetString(containerRuntime)
|
||||
|
||||
|
|
|
@ -211,11 +211,13 @@ RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/
|
|||
clean-install cri-o cri-o-runc; fi
|
||||
|
||||
# install NVIDIA container toolkit
|
||||
RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \
|
||||
RUN export ARCH=$(dpkg --print-architecture) && \
|
||||
if [ "$ARCH" = 'amd64' ] || [ "$ARCH" = 'arm64' ] || [ "$ARCH" = 'ppc64el' ]; then \
|
||||
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \
|
||||
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
|
||||
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
||||
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list && \
|
||||
clean-install nvidia-container-toolkit
|
||||
clean-install nvidia-container-toolkit; fi
|
||||
|
||||
# install version.json
|
||||
ARG VERSION_JSON
|
||||
|
|
Loading…
Reference in New Issue