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

Add config options for Nvidia APT sources, keys, and packages #55

Merged
merged 1 commit into from Oct 8, 2021

Conversation

Cynerva
Copy link
Contributor

@Cynerva Cynerva commented Oct 6, 2021

gpg_key = requests.get(formatted_key_url, proxies=proxies).text
import_key(gpg_key)

sources = config('nvidia_apt_sources').splitlines()
Copy link
Contributor

@johnsca johnsca Oct 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using .split() here like you do for the other fields to be more forgiving. It will split on any whitespace, including newlines, so will also support space-separated, which is easier to do from the CLI.

Suggested change
sources = config('nvidia_apt_sources').splitlines()
sources = config('nvidia_apt_sources').split()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're gonna have to be more specific about what you want here. The default value for nvidia_apt_sources is:

deb https://nvidia.github.io/libnvidia-container/{id}{version_id}/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/{id}{version_id}/$(ARCH) /
deb http://developer.download.nvidia.com/compute/cuda/repos/{id}{version_id_no_dot}/x86_64 /

If I .split() that, I get:

['deb', 'https://nvidia.github.io/libnvidia-container/{id}{version_id}/$(ARCH)', '/', 'deb', 'https://nvidia.github.io/nvidia-container-runtime/{id}{version_id}/$(ARCH)', '/', 'deb', 'http://developer.download.nvidia.com/compute/cuda/repos/{id}{version_id_no_dot}/x86_64', '/']

What do you want me to do with that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shoot, I missed that. Nevermind, then.

Copy link
Contributor

@johnsca johnsca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Minor UX improvement suggested in another comment, but it's not really a blocker. Changes covered by the existing test.

@johnsca johnsca merged commit e870578 into master Oct 8, 2021
@johnsca johnsca deleted the gkk/nvidia-options branch October 8, 2021 14:46
@johnsca
Copy link
Contributor

johnsca commented Oct 8, 2021

Cherry-picked to stable in 81b1bda

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