Skip to content

Commit 4defb27

Browse files
committed
Fix PYTHONPATH to prioritize NGC system packages over pip-packages
Update PYTHONPATH to search /usr/local/lib/python3.12/dist-packages before /pip-packages, ensuring NGC's NumPy 1.x (required by torchvision) is found before pip's NumPy 2.x which gets installed as a transitive dependency. This fixes the 'Numpy is not available' error during OCR inference.
1 parent 79264d7 commit 4defb27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clusters/k3s-stpetersburg/apps/ai/kserve/inferenceservice.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
- name: PYTORCH_CUDA_ALLOC_CONF
4242
value: "max_split_size_mb:512"
4343
- name: PYTHONPATH
44-
value: "/app:/pip-packages"
44+
value: "/app:/usr/local/lib/python3.12/dist-packages:/pip-packages"
4545
ports:
4646
- containerPort: 8080
4747
protocol: TCP

0 commit comments

Comments
 (0)