From 1eda0736a8f72076eca51faf543b3a825359b96e Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 22 Feb 2020 01:30:41 +0100 Subject: Enable DKMS if CUDA is installed and disable cgroups in nvidia-container-runtime --- roles/cuda/tasks/cuda_init.yml | 6 ++++++ roles/docker/tasks/install_podman.yml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/roles/cuda/tasks/cuda_init.yml b/roles/cuda/tasks/cuda_init.yml index ff54994..6d579de 100644 --- a/roles/cuda/tasks/cuda_init.yml +++ b/roles/cuda/tasks/cuda_init.yml @@ -31,6 +31,12 @@ enabled: yes when: ansible_service_mgr == "systemd" +- name: enable the DKMS systemd service + service: + name: dkms + enabled: yes + when: ansible_service_mgr == "systemd" + - name: check if cuda_gpu_name0 ( /dev/nvidia0 ) exists stat: path: "{{ cuda_gpu_name0 }}" diff --git a/roles/docker/tasks/install_podman.yml b/roles/docker/tasks/install_podman.yml index f59e778..f8c7797 100644 --- a/roles/docker/tasks/install_podman.yml +++ b/roles/docker/tasks/install_podman.yml @@ -11,6 +11,11 @@ - nvidia-container-runtime when: "'cuda' in group_names" +#https://github.com/moby/moby/issues/38729 +- name: Disable cgroups until fixes for root-less mode are landed in CentOS + ini_file: dest="/etc/nvidia-container-runtime/config.toml" section="nvidia-container-cli" option="no-cgroups" value="true" backup="no" create="no" state="present" + when: "'cuda' in group_names" + - name: Use vfs storage for system services (as overlay is still problematic) lineinfile: dest="/etc/containers/storage.conf" regexp="driver\s*=" line="driver = \"vfs\"" state="present" register: storage -- cgit v1.2.3