This document provides instructions for building and pushing the Docker image for the AWS Batch job.
- Docker Desktop installed and running
- AWS CLI installed and configured with appropriate credentials
- Access to the AWS ECR repository
- Make sure Docker Desktop is running
- Open a terminal and navigate to the project root directory
- Run the following commands:
# Build the Docker image
docker build -t inspect-evals-scoring:local -f dind.Dockerfile .
# Get your AWS account ID
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
AWS_REGION=$(aws configure get region)
# Create the ECR repository if it doesn't exist
aws ecr create-repository --repository-name inspect-evals-scoring || true
# Log in to ECR
aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com
# Tag and push the image
docker tag inspect-evals-scoring:local $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/inspect-evals-scoring:local
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/inspect-evals-scoring:localAfter pushing the Docker image, register the job definition:
# Navigate to the project root directory
cd /Users/matt/Developer/inspect_ai/inspect_evals_scoring
# Register the job definition
.venv/bin/python aws/register_job_definition.pyAfter registering the job definition, run the AWS Batch job:
# Navigate to the project root directory
cd /Users/matt/Developer/inspect_ai/inspect_evals_scoring
# Run the AWS Batch job
.venv/bin/inspect-evals-scoring aws --model=openai/gpt-4o-mini --limit=2 --tasks=inspect_evals/pubmedqaIf you encounter any issues:
- Check that Docker Desktop is running
- Verify your AWS credentials are correctly configured
- Make sure you have the necessary permissions to push to the ECR repository
- Check the logs for any error messages
For more detailed information, refer to the AWS Batch documentation: https://docs.aws.amazon.com/batch/latest/userguide/what-is-batch.html