neibla / gradio-lambda

demo gradio app on AWS Lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gradio-lambda

Demo gradio app on AWS Lambda

Alternately just use https://huggingface.co/docs/hub/spaces-sdks-gradio or https://cloud.google.com/run

Steps:

  1. Create ECR
aws ecr create-repository --repository-name gradio-demo --region us-west-2             
  1. Install Serverless
npm i
  1. Deploy from local machine
IMAGE=$AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/$IMAGE_NAME:latest serverless deploy
  1. Setup Github Action Secrets for automatic deployment

AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID, IMAGE

  1. Push code or manually trigger Github Action. The Public URL can be retrieved from https://github.com/neibla/gradio-lambda/runs/7449122633?check_suite_focus=true#step:7:17

For a Streamlit/Cloud Run template see https://github.com/neibla/streamlit-google-cloud-run

About

demo gradio app on AWS Lambda


Languages

Language:Python 58.1%Language:Dockerfile 31.1%Language:Shell 10.8%