Skip to content

Commit 7c279c4

Browse files
authored
Merge pull request #288 from weaviate/fix-transfomers-module-configuration-with-enabled-pool
Fix transformers module running with enabled pool
2 parents cf11bd0 + 62d7afc commit 7c279c4

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

weaviate/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type: application
77
# This is the chart version. This version number should be incremented each time you make changes
88
# to the chart and its templates, including the app version.
99
# Versions are expected to follow Semantic Versioning (https://semver.org/)
10-
version: 17.4.0
10+
version: 17.4.1
1111

1212
# This is the version number of the application being deployed. This version number should be
1313
# incremented each time you make changes to the application. Versions are not expected to

weaviate/templates/transformersInferenceDeployment.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ spec:
3636
- name: {{ index $module "fullnameOverride" }}
3737
image: {{ index $module "registry" }}/{{ index $module "repo" }}:{{ index $module "tag" }}
3838
imagePullPolicy: {{ index $module "imagePullPolicy" }}
39+
{{- if index $module "envconfig" "use_sentence_transformers_multi_process" }}
40+
volumeMounts:
41+
- mountPath: /dev/shm
42+
name: devshm
43+
{{- end }}
3944
env:
4045
- name: ENABLE_CUDA
4146
value: "{{ if index $module "envconfig" "enable_cuda" }}1{{ else }}0{{ end }}"
@@ -46,6 +51,8 @@ spec:
4651
value: {{ index $module "envconfig" "nvidia_driver_capabilities"}}
4752
- name: LD_LIBRARY_PATH
4853
value: {{ index $module "envconfig" "ld_library_path"}}
54+
{{- end }}
55+
{{- if index $module "envconfig" "use_sentence_transformers_multi_process" }}
4956
- name: USE_SENTENCE_TRANSFORMERS_MULTI_PROCESS
5057
value: "{{ if index $module "envconfig" "use_sentence_transformers_multi_process" }}1{{ else }}0{{ end }}"
5158
{{- end }}
@@ -88,6 +95,12 @@ spec:
8895
tolerations:
8996
{{ toYaml . | nindent 8 }}
9097
{{- end }}
98+
{{- if index $module "envconfig" "use_sentence_transformers_multi_process" }}
99+
volumes:
100+
- name: devshm
101+
emptyDir:
102+
medium: Memory
103+
{{- end }}
91104
---
92105
apiVersion: v1
93106
kind: Service
@@ -141,6 +154,11 @@ spec:
141154
- name: {{ index $passage "fullnameOverride" }}
142155
image: {{ index $passage "registry" }}/{{ index $passage "repo" }}:{{ index $passage "tag" }}
143156
imagePullPolicy: {{ index $passage "imagePullPolicy" }}
157+
{{- if index $passage "envconfig" "use_sentence_transformers_multi_process" }}
158+
volumeMounts:
159+
- mountPath: /dev/shm
160+
name: passagedevshm
161+
{{- end }}
144162
env:
145163
- name: ENABLE_CUDA
146164
value: "{{ if index $passage "envconfig" "enable_cuda" }}1{{ else }}0{{ end }}"
@@ -151,6 +169,8 @@ spec:
151169
value: {{ index $passage "envconfig" "nvidia_driver_capabilities"}}
152170
- name: LD_LIBRARY_PATH
153171
value: {{ index $passage "envconfig" "ld_library_path"}}
172+
{{- end }}
173+
{{- if index $passage "envconfig" "use_sentence_transformers_multi_process" }}
154174
- name: USE_SENTENCE_TRANSFORMERS_MULTI_PROCESS
155175
value: "{{ if index $passage "envconfig" "use_sentence_transformers_multi_process" }}1{{ else }}0{{ end }}"
156176
{{- end }}
@@ -185,6 +205,12 @@ spec:
185205
tolerations:
186206
{{ toYaml . | nindent 8 }}
187207
{{- end }}
208+
{{- if index $passage "envconfig" "use_sentence_transformers_multi_process" }}
209+
volumes:
210+
- name: passagedevshm
211+
emptyDir:
212+
medium: Memory
213+
{{- end }}
188214
---
189215
apiVersion: v1
190216
kind: Service
@@ -235,6 +261,11 @@ spec:
235261
- name: {{ index $query "fullnameOverride" }}
236262
image: {{ index $query "registry" }}/{{ index $query "repo" }}:{{ index $query "tag" }}
237263
imagePullPolicy: {{ index $query "imagePullPolicy" }}
264+
{{- if index $query "envconfig" "use_sentence_transformers_multi_process" }}
265+
volumeMounts:
266+
- mountPath: /dev/shm
267+
name: querydevshm
268+
{{- end }}
238269
env:
239270
- name: ENABLE_CUDA
240271
value: "{{ if index $query "envconfig" "enable_cuda" }}1{{ else }}0{{ end }}"
@@ -245,6 +276,8 @@ spec:
245276
value: {{ index $query "envconfig" "nvidia_driver_capabilities"}}
246277
- name: LD_LIBRARY_PATH
247278
value: {{ index $query "envconfig" "ld_library_path"}}
279+
{{- end }}
280+
{{- if index $query "envconfig" "use_sentence_transformers_multi_process" }}
248281
- name: USE_SENTENCE_TRANSFORMERS_MULTI_PROCESS
249282
value: "{{ if index $query "envconfig" "use_sentence_transformers_multi_process" }}1{{ else }}0{{ end }}"
250283
{{- end }}
@@ -279,6 +312,12 @@ spec:
279312
tolerations:
280313
{{ toYaml . | nindent 8 }}
281314
{{- end }}
315+
{{- if index $query "envconfig" "use_sentence_transformers_multi_process" }}
316+
volumes:
317+
- name: querydevshm
318+
emptyDir:
319+
medium: Memory
320+
{{- end }}
282321
---
283322
apiVersion: v1
284323
kind: Service

0 commit comments

Comments
 (0)