Skip to content

Commit

Permalink
Add drop in units to add NVIDIA bin paths to mesos-agent.
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitizbakshi committed Dec 1, 2017
1 parent 74f19e3 commit 0bffad7
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions ignition-gpu.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,31 @@
{
"name":"nvidia-gpu-drivers-install.service",
"enable":true,
"contents":"[Unit]\nDescription=Install NVIDIA Drivers\nAfter=network-online.target\nWants=network-online.target\nWants=nvidia-gpu-drivers-setup-paths.service\nBefore=dcos-setup.service\nAfter=nvidia-gpu-drivers-setup-paths.service\n[Service]\nType=oneshot\nStandardOutput=journal+console\nStandardError=journal+console\nEnvironmentFile=/etc/os-release\nExecStartPre=/usr/bin/curl --keepalive-time 2 -fLsSv --retry 20 -Y 100000 -y 60 -o /opt/tmp/nvidia/source.zip https://github.com/kshitizbakshi/coreos-nvidia/archive/master.zip\nExecStartPre=/usr/bin/unzip /opt/tmp/nvidia/source.zip -d /opt/tmp/nvidia/\nWorkingDirectory=/opt/tmp/nvidia/coreos-nvidia-master\nExecStartPre=/bin/bash /opt/tmp/nvidia/coreos-nvidia-master/build.sh 384.81 stable $VERSION_ID\nExecStart=/bin/bash /opt/tmp/nvidia/coreos-nvidia-master/nvidia_install.sh 384.81 stable $VERSION_ID\nExecStartPost=-/usr/bin/rm -rf /opt/tmp/nvidia\n[Install]\nWantedBy=dcos-setup.service\n"
"contents":"[Unit]\nDescription=Install NVIDIA Drivers\nAfter=network-online.target\nWants=network-online.target\nWants=nvidia-gpu-drivers-setup-paths.service\nBefore=dcos-setup.service\nAfter=nvidia-gpu-drivers-setup-paths.service\n[Service]\nType=oneshot\nStandardOutput=journal+console\nStandardError=journal+console\nEnvironmentFile=/etc/os-release\nExecStartPre=/usr/bin/curl --keepalive-time 2 -fLsSv --retry 20 -Y 100000 -y 60 -o /opt/tmp/nvidia/source.zip https://github.com/kshitizbakshi/coreos-nvidia/archive/master.zip\nExecStartPre=/usr/bin/unzip /opt/tmp/nvidia/source.zip -d /opt/tmp/nvidia/\nWorkingDirectory=/opt/tmp/nvidia/coreos-nvidia-master\nExecStartPre=/bin/bash /opt/tmp/nvidia/coreos-nvidia-master/build.sh 384.81 stable $VERSION_ID\nExecStart=/bin/bash /opt/tmp/nvidia/coreos-nvidia-master/nvidia_install.sh 384.81 stable $VERSION_ID\nExecStartPost=/usr/bin/rm -rf /opt/tmp/nvidia\n[Install]\nWantedBy=dcos-setup.service\n"
},
{
"name":"nvidia-gpu-drivers-setup-paths.service",
"enable":true,
"contents":"[Unit]\nDescription=Add NVIDIA lib paths to DC/OS slave environment\nAfter=network-online.target\nWants=network-online.target\nBefore=nvidia-gpu-drivers-install.service\n [Service]\nType=oneshot\nStandardOutput=journal+console\nStandardError=journal+console\n\nExecStartPre=/usr/bin/rm -rf /opt/tmp/nvidia/coreos-nvidia-master\nExecStart=/usr/bin/mkdir -p /opt/tmp/nvidia/coreos-nvidia-master\n"
}
},
{
"name": "dcos-mesos-slave.service",
"dropins": [
{
"name": "21-dcos-mesos-agent-nvidia-paths.conf",
"contents": "[Service]\nExecStartPre=/bin/bash -c '/usr/bin/ln -s /opt/bin/* /opt/mesosphere/bin || true'\n"
}
]
},
{
"name": "dcos-mesos-slave-public.service",
"dropins": [
{
"name": "21-dcos-mesos-agent-nvidia-paths.conf",
"contents": "[Service]\nExecStartPre=/bin/bash -c '/usr/bin/ln -s /opt/bin/* /opt/mesosphere/bin || true'\n"
}
]
}
]
}
}

0 comments on commit 0bffad7

Please sign in to comment.