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

Parameterize kernel download and nvidia installer options. #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clkao
Copy link

@clkao clkao commented Jan 22, 2019

This allows reusing the entrypoint by overriding how the kernel is downloaded and where to look for it.

As an alternative to #91, you can use this for centos by setting the following extra env in the daemonset:

          - name: KERNEL_SOURCE_DOWNLOAD_COMMAND
            value: 'yum install -y kernel-devel-${KERNEL_VERSION}'
          - name: NVIDIA_INSTALLER_EXTRA_ARGS
            value: '--kernel-source-path=/usr/src/kernels/${KERNEL_VERSION}'

It is also possible to use this for airgapped install provided the kernel-devel package and .run file are available on the host:

          - name: NVIDIA_DRIVER_DOWNLOAD_URL
            value: file:///root/usr/src/NVIDIA-Linux-x86_64-384.130.run
          - name: KERNEL_SOURCE_DOWNLOAD_COMMAND
            value: 'echo'
          - name: NVIDIA_INSTALLER_EXTRA_ARGS
            value: '--kernel-source-path=/root/usr/src/kernels/${KERNEL_VERSION}'

Note that you'd still need a centos-based installer image using the Dockerfile from #91, but with the same entrypoint.sh

This allows reusing the entrypoint by overriding how the kernel is downloaded and where to look for it.

As an alternative to GoogleCloudPlatform#91, you can use this for centos by setting the following extra env in the daemonset:

```
          - name: KERNEL_SOURCE_DOWNLOAD_COMMAND
            value: 'yum install -y kernel-devel-${KERNEL_VERSION}'
          - name: NVIDIA_INSTALLER_EXTRA_ARGS
            value: '--kernel-source-path=/usr/src/kernels/${KERNEL_VERSION}'

```

It is also possible to use this for airgapped install provided the kernel-devel package and .run file are available on the host:

```
          - name: NVIDIA_DRIVER_DOWNLOAD_URL
            value: file:///root/usr/src/NVIDIA-Linux-x86_64-384.130.run
          - name: KERNEL_SOURCE_DOWNLOAD_COMMAND
            value: 'echo'
          - name: NVIDIA_INSTALLER_EXTRA_ARGS
            value: '--kernel-source-path=/root/usr/src/kernels/${KERNEL_VERSION}'
```
@clkao
Copy link
Author

clkao commented Jan 22, 2019

per #91 (comment) and #54, installers for additional distributions aren't likely to be merged due to maintainability.

If entrypoint.sh becomes common enough, we can rename ubuntu/ to generic/, and have additional Dockerfile.$distribution (that might not be tested and supported). This could be the case for the minikube installer too, as its entrypoint is largely the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants