Skip to content

Commit 7f714da

Browse files
authored
bring back dshm volume for A3 Mega and A3 High (#512)
1 parent ec9e9d4 commit 7f714da

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/xpk/core/workload_decorators/tcpx_decorator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ def add_volumes(job_manifest: dict):
131131
})
132132
volumes.append({'name': 'sys', 'hostPath': {'path': '/sys'}})
133133
volumes.append({'name': 'proc-sys', 'hostPath': {'path': '/proc/sys'}})
134+
volumes.append(
135+
{'name': 'dshm', 'emptyDir': {'medium': 'Memory', 'sizeLimit': '128Gi'}}
136+
)
134137

135138

136139
def add_tcpx_daemon_container(job_manifest):
@@ -177,3 +180,6 @@ def update_gpu_containers(job_manifest):
177180
volumeMounts.append(
178181
{'name': 'libraries', 'mountPath': '/usr/local/nvidia/lib64'}
179182
)
183+
container['volumeMounts'].append(
184+
{'name': 'dshm', 'mountPath': '/dev/shm'}
185+
)

src/xpk/core/workload_decorators/tcpxo_decorator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""
1616

1717
import yaml
18+
1819
from ...utils.yaml import literal_string
1920

2021
# Component version
@@ -141,6 +142,9 @@ def add_volumes(job_manifest):
141142
'name': 'aperture-devices',
142143
'hostPath': {'path': '/dev/aperture_devices'},
143144
})
145+
volumes.append(
146+
{'name': 'dshm', 'emptyDir': {'medium': 'Memory', 'sizeLimit': '128Gi'}}
147+
)
144148

145149

146150
def add_tcpxo_daemon_container(job_manifest):
@@ -189,3 +193,6 @@ def update_gpu_containers(job_manifest):
189193
container['volumeMounts'].append(
190194
{'name': 'libraries', 'mountPath': '/usr/local/nvidia'}
191195
)
196+
container['volumeMounts'].append(
197+
{'name': 'dshm', 'mountPath': '/dev/shm'}
198+
)

0 commit comments

Comments
 (0)