Skip to content

Commit

Permalink
packages,sources: add NVIDIA docker configurations
Browse files Browse the repository at this point in the history
This adds the shimpei and docker configurations to set up the `nvidia`
runtime for variants that use docker as their containers runtime.

Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
  • Loading branch information
arnaldo2792 committed Apr 27, 2022
1 parent cb57851 commit e74feda
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 1 deletion.
19 changes: 19 additions & 0 deletions packages/docker-engine/daemon-nvidia-json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"log-driver": "journald",
"live-restore": true,
"max-concurrent-downloads": 10,
"storage-driver": "overlay2",
"exec-opts": ["native.cgroupdriver=cgroupfs"],
"data-root": "/var/lib/docker",
"default-runtime": "nvidia",
"runtimes": { "shimpei": { "path": "shimpei" }, "nvidia": { "path": "nvidia-oci" } },
"selinux-enabled": true,
"default-ulimits": { "nofile": { "Name": "nofile", "Soft": 1024, "Hard": 4096 } }
{{#if settings.container-registry.mirrors}}
{{#each settings.container-registry.mirrors}}
{{#if (eq registry "docker.io" )}},
"registry-mirrors": [{{join_array ", " endpoint}}]
{{/if}}
{{/each}}
{{/if}}
}
3 changes: 3 additions & 0 deletions packages/docker-engine/docker-engine.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Source1: docker.service
Source2: docker.socket
Source3: docker-sysusers.conf
Source4: daemon-json
Source5: daemon-nvidia-json
Source1000: clarify.toml

BuildRequires: git
Expand Down Expand Up @@ -69,6 +70,7 @@ install -p -m 0644 %{S:3} %{buildroot}%{_cross_sysusersdir}/docker.conf

install -d %{buildroot}%{_cross_templatedir}
install -p -m 0644 %{S:4} %{buildroot}%{_cross_templatedir}/docker-daemon-json
install -p -m 0644 %{S:5} %{buildroot}%{_cross_templatedir}/docker-daemon-nvidia-json

%cross_scan_attribution --clarify %{S:1000} go-vendor vendor

Expand All @@ -80,5 +82,6 @@ install -p -m 0644 %{S:4} %{buildroot}%{_cross_templatedir}/docker-daemon-json
%{_cross_unitdir}/docker.socket
%{_cross_sysusersdir}/docker.conf
%{_cross_templatedir}/docker-daemon-json
%{_cross_templatedir}/docker-daemon-nvidia-json

%changelog
3 changes: 3 additions & 0 deletions sources/models/shared-defaults/docker-daemon-nvidia.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[configuration-files.docker-daemon-config]
path = "/etc/docker/daemon.json"
template-path = "/usr/share/templates/docker-daemon-nvidia-json"
17 changes: 17 additions & 0 deletions sources/models/shared-defaults/nvidia-oci-hooks-docker.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[settings.oci-hooks]
log4j-hotpatch-enabled = false

[metadata.settings.oci-hooks]
affected-services = ["oci-hooks"]

[services.oci-hooks]
configuration-files = ["oci-hooks", "nvidia-oci-hooks"]
restart-commands = []

[configuration-files.oci-hooks]
path = "/etc/shimpei/shimpei-hooks.json"
template-path = "/usr/share/templates/oci-default-hooks-json"

[configuration-files.nvidia-oci-hooks]
path = "/etc/shimpei/nvidia-oci-hooks.json"
template-path = "/usr/share/templates/nvidia-oci-hooks-json"

0 comments on commit e74feda

Please sign in to comment.