-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare-for-inference.yaml
48 lines (48 loc) · 1.48 KB
/
prepare-for-inference.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
37
38
39
40
41
42
43
44
45
46
47
48
apiVersion: batch/v1
kind: Job
metadata:
name: {STORY_ID}-prepare-for-inference
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 0
template:
spec:
containers:
- name: prepare-for-inference
image: us.gcr.io/$ARTEFACTS_PROJECT_NAME/speech-to-landmarks
env:
- name: AUDIO_FMT
value: "$AUDIO_FMT"
- name: FPS
value: "$FPS"
- name: IMG_FMT
value: "$IMG_FMT"
command: ["bash", "-c",
"echo prepare-for-inference `date` >> /data/events.log && \
mkdir /models && \
gcsfuse \
--implicit-dirs \
$MODELS_BUCKET_NAME \
/models && \
python3 prepare_for_inference.py && \
gcloud pubsub topics publish completed-prepare-for-inference \
--message \"{STORY_ID}\" && \
echo prepare-for-inference `date` >> /data/events.log"]
workingDir: /app
securityContext:
privileged: true
capabilities:
add:
- SYS_ADMIN
resources:
limits:
cpu: "$NUM_CPUS"
volumeMounts:
- name: data
mountPath: /data
subPath: {STORY_ID}
restartPolicy: Never
volumes:
- name: data
hostPath:
path: /mnt/disks/ssd0