This guide walks you through launching a GPU instance, setting up the environment, and running the test suite end-to-end.
Use the Deep Learning OSS Nvidia Driver AMI (Ubuntu 24.04) provided by AWS.
To find it in the AWS Console:
- Go to EC2 → Launch Instance → Browse AMIs
- Search for:
Deep Learning OSS Nvidia Driver AMI GPU PyTorch - Select the latest Ubuntu 24.04 variant (e.g.,
Deep Learning OSS Nvidia Driver AMI GPU PyTorch 2.10 (Ubuntu 24.04))
Or via AWS CLI:
aws ec2 describe-images --owners amazon \
--filters "Name=name,Values=Deep Learning OSS Nvidia Driver AMI GPU PyTorch 2.* (Ubuntu 24.04)*" \
"Name=state,Values=available" \
--query 'Images | sort_by(@, &CreationDate) | [-1].{Name:Name, ImageId:ImageId}' \
--output table| Instance Type | GPU | vCPUs | Memory | Cost (us-east-1) |
|---|---|---|---|---|
g4dn.xlarge (Recommended) |
1× NVIDIA T4 (16 GB) | 4 | 16 GB | ~$0.526/h |
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type g4dn.xlarge \
--subnet-id <private-subnet-id> \
--iam-instance-profile Name=<ssm-instance-profile-name> \
--no-associate-public-ip-address \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":100,"VolumeType":"gp3"}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=auto-e2e-test}]'Once the instance is running and SSM agent is online (~30–60 seconds after launch):
aws ssm start-session --target <instance-id>Then switch to the ubuntu user:
sudo -i -u ubuntu
cd ~git clone https://github.com/autowarefoundation/auto_e2e.git
cd auto_e2eThe AMI comes with NVIDIA drivers pre-installed but Python packages are not available globally. Create a virtual environment:
python3 -m venv ~/e2e-env
source ~/e2e-env/bin/activateInstall dependencies with CUDA torch wheels (plain make setup installs CPU-only wheels):
make setup TORCH_CHANNEL=cu118This takes 2–3 minutes. Verify the installation:
python -c "import torch; print(f'PyTorch {torch.__version__}, CUDA available: {torch.cuda.is_available()}')"Expected output:
PyTorch 2.7.1+cu118, CUDA available: True
cd ~/auto_e2e
make testThe run ends with a pytest summary reporting that all selected tests passed. For the model's inputs, outputs and forward signature, see the Model architecture guide.
Remember to terminate the instance when you are done to avoid unnecessary charges:
aws ec2 terminate-instances --instance-ids <instance-id>