Files
603d9f5672 Restrict storage uri to predictor only in collocation of transformer and predictor (#3280)
* Restrict storage uri to predictor only in transformer collocation

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* Add unit tests

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* Add e2e test

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* fmt

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* Fix e2e test debug info

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* Improve quick install script

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* Update docs

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* fix indentation on quick install

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

---------

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
Signed-off-by: Dan Sun <[email protected]>
Co-authored-by: Dan Sun <[email protected]>
2023-12-23 14:06:45 -05:00

46 lines
1.5 KiB
YAML

apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: custom-transformer-collocation
spec:
predictor:
containers:
- name: kserve-container # Do not change the name; This should be the predictor container
image: "pytorch/torchserve:0.9.0-cpu"
args:
- "torchserve"
- "--start"
- "--model-store=/mnt/models/model-store"
- "--ts-config=/mnt/models/config/config.properties"
env:
- name: TS_SERVICE_ENVELOPE
value: kserve
- name: STORAGE_URI # This will trigger storage initializer; Should be only present in predictor container
value: "gs://kfserving-examples/models/torchserve/image_classifier/v1"
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1
memory: 1Gi
- name: transformer-container # Do not change the container name
image: kserve/image-transformer:latest
args:
- --model_name=mnist
- --protocol=v1 # protocol of the predictor; used for converting the input to specific protocol supported by the predictor
- --http_port=8080
- --grpc_port=8081
- --predictor_host=localhost:8085 # predictor listening port
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 1
memory: 1Gi