Skip to content

Commit 6e8e2cb

Browse files
Deploying to gh-pages from @ 89a0a79 🚀
1 parent e18f228 commit 6e8e2cb

File tree

4 files changed

+406
-450
lines changed

4 files changed

+406
-450
lines changed

4.3/config/share_pod_GPU_access_to_ephemeral_container/index.html

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5531,15 +5531,6 @@
55315531
</span>
55325532
</a>
55335533

5534-
</li>
5535-
5536-
<li class="md-nav__item">
5537-
<a href="#apply-runtimeclassname-to-abcdesktop-config-release-43" class="md-nav__link">
5538-
<span class="md-ellipsis">
5539-
Apply runtimeClassName to abcdesktop config (release &gt;= 4.3 )
5540-
</span>
5541-
</a>
5542-
55435534
</li>
55445535

55455536
<li class="md-nav__item">
@@ -5752,6 +5743,9 @@ <h3 id="create-an-ephemeral-container-inside-simple-pod_1">Create an ephemeral c
57525743
- name: NVIDIA_DRIVER_CAPABILITIES
57535744
value: all
57545745
</code></pre></div>
5746+
<blockquote>
5747+
<p>The <code>NVIDIA_VISIBLE_DEVICES</code> is set to set GPU UUID.</p>
5748+
</blockquote>
57555749
<p>Run a debug ephemeral container in <code>nvidia-pod</code></p>
57565750
<div class="highlight"><pre><span></span><code>kubectl debug -it nvidia-pod --image=ubuntu --target=cuda-container --profile=general --custom=custom-profile-nvidia-gpu.yaml -- nvidia-smi -L
57575751
</code></pre></div>
@@ -5802,44 +5796,6 @@ <h3 id="delete-nvidia-pod">Delete <code>nvidia-pod</code></h3>
58025796
</code></pre></div>
58035797
<h2 id="conclusion">Conclusion</h2>
58045798
<p>Setting <code>runtimeClassName: nvidia</code> on pod manifest allows ephemeral containers to share the pod's GPU.</p>
5805-
<h2 id="apply-runtimeclassname-to-abcdesktop-config-release-43">Apply <code>runtimeClassName</code> to abcdesktop config (release &gt;= 4.3 )</h2>
5806-
<p>Get the <code>od.config</code> file</p>
5807-
<p>If you don't already have the config file <code>od.config</code>, run the command line </p>
5808-
<div class="highlight"><pre><span></span><code>kubectl -n abcdesktop get configmap abcdesktop-config -o jsonpath=&#39;{.data.od\.config}&#39; &gt; od.config
5809-
</code></pre></div>
5810-
<ul>
5811-
<li>Edit <code>od.config</code> and update the dictionary <code>desktop.pod</code> to add <code>'runtimeClassName':'nvidia'</code> in <code>spec</code> and save your od.config file.</li>
5812-
</ul>
5813-
<div class="highlight"><pre><span></span><code>desktop.pod : {
5814-
# default spec for all containers
5815-
# can be overwritten on dedicated container spec
5816-
# value inside mustrache like {{ uidNumber }} is replaced by context run value
5817-
# for example {{ uidNumber }} is the uid number define in ldap server
5818-
&#39;spec&#39; : {
5819-
&#39;shareProcessNamespace&#39;: False,
5820-
&#39;securityContext&#39;: {
5821-
&#39;supplementalGroups&#39;: [ &#39;{{ supplementalGroups }}&#39; ],
5822-
&#39;runAsUser&#39;: &#39;{{ uidNumber }}&#39;,
5823-
&#39;runAsGroup&#39;: &#39;{{ gidNumber }}&#39;
5824-
},
5825-
&#39;tolerations&#39;: [],
5826-
&#39;runtimeClassName&#39;: &#39;nvidia&#39;
5827-
},
5828-
...
5829-
</code></pre></div>
5830-
<ul>
5831-
<li>Update the configmap <code>abcdesktop-config</code></li>
5832-
</ul>
5833-
<div class="highlight"><pre><span></span><code>kubectl create -n abcdesktop configmap abcdesktop-config --from-file=od.config -o yaml --dry-run=client | kubectl replace -n abcdesktop -f -
5834-
</code></pre></div>
5835-
<ul>
5836-
<li>Restart deployment <code>pyos-od</code></li>
5837-
</ul>
5838-
<div class="highlight"><pre><span></span><code>kubectl rollout restart deployment pyos-od -n abcdesktop
5839-
</code></pre></div>
5840-
<ul>
5841-
<li>Create a new desktop pod to check the <code>runtimeClassName</code></li>
5842-
</ul>
58435799
<h2 id="links">Links</h2>
58445800
<ul>
58455801
<li>nvidia gpu-operator/23.6.2</li>

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)