Skip to content

[PRODUCTION] BUILD & PUSH - hosted inference docker #15

[PRODUCTION] BUILD & PUSH - hosted inference docker

[PRODUCTION] BUILD & PUSH - hosted inference docker #15

name: "[PRODUCTION] BUILD & PUSH - hosted inference docker"
on:
workflow_dispatch:
inputs:
exclude_slim_lambda:
type: boolean
description: "Do you want to exclude SLIM version of lambda?"
default: false
exclude_core_models_lambda:
type: boolean
description: "Do you want to exclude CORE MODELS version of lambda?"
default: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: ⚙️ Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY }}
- name: 🔑 Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
with:
registries: ${{ secrets.PRODUCTION_AWS_ACCOUNT_ID }}
mask-password: "true" # see: https://github.com/aws-actions/amazon-ecr-login#docker-credentials
- name: 🛠️ Build and push docker image [SLIM] to PRODUCTION 🚨
if: ${{ github.event.inputs.exclude_slim_lambda == 'false' }}
run: |
./docker/publish/onnx_lambda.sh roboflow-platform slim
- name: 🛠️ Build and push docker image [CORE MODELS] to PRODUCTION 🚨
if: ${{ github.event.inputs.exclude_core_models_lambda == 'false' }}
run: |
./docker/publish/onnx_lambda.sh roboflow-platform