Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
002fbfcf
Commit
002fbfcf
authored
8 years ago
by
Chris Hines
Browse files
Options
Downloads
Patches
Plain Diff
enable the persistence daemon and set the graphics operation mode (GOM)
parent
1ad4bef5
No related branches found
Branches containing commit
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/gpu/tasks/main.yml
+32
-55
32 additions, 55 deletions
roles/gpu/tasks/main.yml
with
32 additions
and
55 deletions
roles/gpu/tasks/main.yml
+
32
−
55
View file @
002fbfcf
...
@@ -35,18 +35,37 @@
...
@@ -35,18 +35,37 @@
become
:
true
become
:
true
become_user
:
root
become_user
:
root
-
name
:
template unit for for persistenced
template
:
src=nvidia-persistenced.service dest=/etc/systemd/system/nvidia-persistenced.service
become
:
true
become_user
:
root
-
name
:
create the nvidia-persistenced user
user
:
name=nvidia-persistenced state=present system=yes shell=/bin/false
become
:
true
become_user
:
root
-
name
:
enable persistenced on boot
service
:
name=nvidia-persistenced state=started enabled=yes
become
:
true
become_user
:
root
-
name
:
remove nouveau
modprobe
:
name=nouveau state=absent
become
:
true
become_user
:
root
-
name
:
check nvidia driver
-
name
:
check nvidia driver
s
hell
:
ls
/usr/lib64/libnvidia-opencl.so.{{ nvidia_version }}
s
tat
:
path="
/usr/lib64/libnvidia-opencl.so.{{ nvidia_version }}
"
register
:
drivers_installed
register
:
opencl
ignore_errors
:
true
ignore_errors
:
true
-
name
:
get nvidia driver
-
name
:
get nvidia driver
shell
:
wget http://consistency0/src/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run
get_url
:
url=http://consistency0/src/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run dest=/tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run
args
:
become
:
true
chdir
:
/tmp
become_user
:
root
creates
:
/tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run
when
:
not opencl.stat.exists
sudo
:
true
when
:
drivers_installed | failed
#- name: Copy boot file
#- name: Copy boot file
# template: src=grub.conf.j2 dest=/boot/grub/grub.conf
# template: src=grub.conf.j2 dest=/boot/grub/grub.conf
...
@@ -60,54 +79,12 @@
...
@@ -60,54 +79,12 @@
template
:
src=xserver.j2 dest=/etc/pam.d/xserver
template
:
src=xserver.j2 dest=/etc/pam.d/xserver
sudo
:
true
sudo
:
true
-
name
:
look for nouveau
shell
:
/usr/sbin/lsmod
register
:
lsmod_output
-
name
:
set nouveau string
set_fact
:
nouveau='nouveau'
-
name
:
restart_host
shell
:
sleep 5 ; shutdown -r now "Reboot triggered by Ansible"
async
:
2
poll
:
1
sudo
:
true
ignore_errors
:
true
when
:
nouveau in lsmod_output.stdout
-
name
:
waiting for server to come back
local_action
:
wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
sudo
:
false
when
:
nouveau in lsmod_output.stdout
-
name
:
build nvidia driver
-
name
:
build nvidia driver
shell
:
chmod 755 /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run; /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run --silent
shell
:
chmod 755 /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run; /tmp/NVIDIA-Linux-x86_64-{{ nvidia_version }}.run --silent
sudo
:
true
sudo
:
true
when
:
drivers_installed | failed
when
:
not opencl.stat.exists
-
name
:
restart_host
shell
:
sleep 5 ; shutdown -r now "Reboot triggered by Ansible"
async
:
2
poll
:
1
sudo
:
true
ignore_errors
:
true
when
:
drivers_installed | failed
-
name
:
waiting for server to come back
local_action
:
wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
sudo
:
false
when
:
drivers_installed|failed
#- name: set persistence mode
# lineinfile:
# args:
# dest: /etc/rc.d/rc.local
# line: "nvidia-smi --persistence-mode=1"
# state: present
# sudo: true
#- name: Load module
# shell: modprobe nvidia
# sudo: true
-
name
:
set the GOM
shell
:
nvidia-smi --gom=0
become
:
true
become_user
:
root
This diff is collapsed.
Click to expand it.
Chris Hines
@chines
mentioned in commit
bb106ec5
·
4 years ago
mentioned in commit
bb106ec5
mentioned in commit bb106ec5406d0d209bb8c497f8d3198ff3639f74
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment