Example
Define an API
# main.py
print("hello world")Create a Dockerfile
DockerfileFROM python:3.8-slim
COPY main.py /
CMD exec python main.pyBuild an image
docker build . -t hello-worldRun a container locally
docker run -it --rm hello-worldLogin to ECR
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.comCreate a repository
Tag the image
Push the image
Configure a Cortex deployment
Create a Cortex deployment
Get the API endpoint
Make a request
View the logs
Last updated