A sample application that calls the sagemaker endpoint asynchronously using FastAPI.
- Build the container image with a dockerfile.
$ docker build -t sagemaker-endpoint-test -f ./Dockerfile.sagemaker .
- Push a Docker image to an Amazon ECR repository.
$ docker push [aws_account_id].dkr.ecr.[region].amazonaws.com/sagemaker-endpoint-test
- Create a samemaker endpoint by referring to this page.
## Copy the dotenv file
$ cp ./dotenv.sample ./.env
## configure the aws credentials
$ vi .env
## Start the container.
$ docker-compose up -d
## Launch the application
$ docker-compose exec app python main.py
## Execute the script for the test request
$ docker-compose exec app python request_test.py