# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- - name: Add nvidia-docker2 Repo get_url: url: "{{ nvidia_docker_repo_url }}" dest: "{{ nvidia_docker_repo_dest }}" tags: install, testing - name: Add libnvidia container Repo get_url: url: "{{ nvidia_container_repo_url }}" dest: "{{ nvidia_container_repo_dest }}" tags: install, testing - name: Install nvidia driver and nvidia-docker2 package: name: "{{ nvidia_packages }}" enablerepo: libnvidia-container,nvidia-docker state: present tags: install - name: Reboot after installing GPU drivers reboot: tags: install - name: Set nvidia as default runtime copy: src: daemon.json dest: "{{ daemon_file_dest }}" owner: root group: root mode: "{{ daemon_file_mode }}" tags: install - name: Restart and enable docker service service: name: docker state: restarted enabled: yes daemon_reload: yes tags: install - name: Restart and enable kubernetes - kubelet service: name: kubelet state: restarted enabled: yes tags: install