Skip to content

Commit dfab732

Browse files
tjohnson31415njhill
authored andcommitted
fix: update read-only-root patch for PT2 compile
Instead of pointing HF_HOME to /tmp, just mount a writeable emtpyDir to the default home directory. Then any library that caches to the home directory will work (eg. JIT compilation for CUDA and for PyTorch compile w/ Triton). Signed-off-by: Travis Johnson <[email protected]>
1 parent b0d32ef commit dfab732

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

deployment/base/patches/read-only-root-filesystem.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ spec:
77
spec:
88
containers:
99
- name: server
10-
env:
11-
# set base directory for caches
12-
- name: HF_HOME
13-
value: /tmp/
1410
securityContext:
1511
readOnlyRootFilesystem: true
1612
volumeMounts:
13+
# Writeable home directory for caches
14+
- name: home
15+
mountPath: /home/tgis
16+
# Need a temp directory for Python
1717
- name: tmp
1818
mountPath: /tmp
1919
volumes:
20+
- name: home
21+
emptyDir: {}
2022
- name: tmp
2123
emptyDir: {}

0 commit comments

Comments
 (0)