-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to prewarm inference image (#102)
Loads the inference server docker image at cluster start - to save time and confusion.
- Loading branch information
1 parent
ceaf596
commit 682d849
Showing
5 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
deploy/k3s/inference_deployment/warmup_inference_model.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: warmup-inference-model | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: OnFailure | ||
imagePullSecrets: | ||
- name: registry-credentials | ||
containers: | ||
- name: image-puller | ||
image: 767397850842.dkr.ecr.us-west-2.amazonaws.com/gl-edge-inference:latest | ||
command: ["echo", "Pulling image to warm cache"] | ||
- name: sync-pinamod | ||
image: amazon/aws-cli:latest | ||
# Sync models from S3 to the local hostmapped filesystem. | ||
command: ['sh', '-c', 'aws s3 sync s3://pinamod-artifacts-public/pinamod $PINAMOD_DIR --delete'] | ||
env: | ||
- name: AWS_ACCESS_KEY_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-credentials | ||
key: aws_access_key_id | ||
- name: AWS_SECRET_ACCESS_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-credentials | ||
key: aws_secret_access_key | ||
- name: PINAMOD_DIR | ||
value: /opt/models/pinamod | ||
volumeMounts: | ||
- name: pina-models | ||
mountPath: /opt/models | ||
volumes: | ||
- name: pina-models | ||
hostPath: | ||
path: /opt/groundlight/edge/pinamod-public | ||
type: Directory | ||
backoffLimit: 2 |