forked from kubeflow/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
batch-predict.yaml
36 lines (35 loc) · 1.23 KB
/
batch-predict.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
apiVersion: batch/v1
kind: Job
metadata:
name: batch-predict-object-detection
spec:
template:
spec:
containers:
- name: batch-predict-object-detection
image: gcr.io/kubeflow-examples/batch-predict:tf18-gpu
imagePullPolicy: Always
args:
- "--input_file_pattern=gs://kubeflow-examples-data/object-detection-coco/data/object-detection-images.tfrecord"
- "--input_file_format=tfrecord"
- "--model_dir=gs://kubeflow-examples-data/object-detection-coco/image_string_model/saved_model"
- "--batch_size=4"
- "--output_result_prefix=gs://<your_gcs_bucket>/<your_detection_result_file_name_prefix>"
- "--output_error_prefix=gs://<your_gcs_bucket>/<your_detection_error_file_name_prefix>"
env:
- name: "GOOGLE_APPLICATION_CREDENTIALS"
value: "/secret/gcp-credentials/key.json"
volumeMounts:
- name: gcp-credentials
readOnly: True
mountPath: /secret/gcp-credentials
resources:
limits:
nvidia.com/gpu: 1
restartPolicy: Never
volumes:
- name: gcp-credentials
secret:
secretName: user-gcp-sa
backoffLimit: 1