Setup Guide: Cloud-Native Development
Learning Objectives
- Launch GPU-enabled VM instances on AWS EC2 or Azure
- Install ROS 2 and Isaac Sim on cloud infrastructure
- Configure remote desktop access for GUI applications
- Estimate cloud costs and optimize usage for the course
Before You Begin
⏱️ Estimated Time: 120 minutes
Prerequisites: None - this chapter is suitable for beginners.
Estimated Time: 2 hours | Difficulty: Intermediate
Overview
The Cloud-Native setup uses rented GPU instances from AWS or Azure. This is ideal if you:
- ✅ Don't have an RTX GPU
- ✅ Don't want to invest in hardware upfront ($0 initial cost)
- ✅ Need flexibility to scale resources up/down
- ✅ Want to access powerful GPUs on-demand
Trade-offs
| Pros | Cons |
|---|---|
| No hardware investment | Ongoing monthly costs ($50-$200) |
| Access latest GPUs (A100, V100) | Network latency for remote desktop |
| Scalable (add GPUs as needed) | Data transfer costs |
| Pre-configured images available | Requires internet connection |
Cost Estimate
AWS EC2 (g4dn.xlarge - RTX T4 equivalent)
| Item | Cost |
|---|---|
| Instance (g4dn.xlarge: 4 vCPU, 16GB RAM, T4 GPU) | $0.526/hour |
| Storage (100GB EBS SSD) | $10/month |
| Estimated Usage (40 hours/month for course) | ~$21/month |
| Data Transfer (100GB/month) | $9/month |
| Total (3 months) | ~$90-$120 |
Azure NC6s_v3 (V100 GPU)
| Item | Cost |
|---|---|
| Instance (NC6s_v3: 6 vCPU, 112GB RAM, V100) | $3.06/hour |
| Storage (256GB Premium SSD) | $40/month |
| Estimated Usage (20 hours/month - more powerful) | ~$61/month |
| Total (3 months) | ~$180-$250 |
Recommendation: Start with AWS g4dn.xlarge ($90 for course), upgrade to V100 if needed for Module 3-4.
Option A: AWS EC2 Setup
Step 1: Create AWS Account
- Visit: https://aws.amazon.com/
- Sign up (requires credit card, $1 verification charge)
- Navigate to EC2 Dashboard
Step 2: Launch GPU Instance
# Option A: AWS Console (GUI)
1. EC2 Dashboard → Launch Instance
2. Name: "Physical-AI-Workstation"
3. AMI: Ubuntu Server 22.04 LTS (HVM)
4. Instance Type: g4dn.xlarge (4 vCPU, 16GB, T4 GPU)
5. Key Pair: Create new → Download .pem file
6. Storage: 100GB gp3 SSD
7. Security Group:
- SSH (22) - Your IP only
- RDP (3389) - Your IP (for remote desktop)
8. Launch Instance
# Option B: AWS CLI
aws ec2 run-instances \
--image-id ami-0c7217cdde317cfec \
--instance-type g4dn.xlarge \
--key-name physical-ai-key \
--security-group-ids sg-xxxxx \
--subnet-id subnet-xxxxx \
--block-device-mappings DeviceName=/dev/sda1,Ebs={VolumeSize=100}
Step 3: Connect to Instance
# SSH into instance
chmod 400 physical-ai-key.pem
ssh -i physical-ai-key.pem ubuntu@<EC2-PUBLIC-IP>
# Update system
sudo apt update && sudo apt upgrade -y
Step 4: Install NVIDIA Drivers
# Install NVIDIA drivers (already pre-installed on g4dn)
nvidia-smi # Should show T4 GPU
# If not installed:
sudo apt install -y nvidia-driver-535 nvidia-cuda-toolkit
sudo reboot
Step 5: Install ROS 2 Humble
# Follow same steps as Workstation Setup
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] \
http://packages.ros.org/ros2/ubuntu jammy main" | \
sudo tee /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt install ros-humble-desktop -y
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc
Step 6: Setup Remote Desktop (VNC)
# Install desktop environment
sudo apt install ubuntu-desktop -y
sudo apt install tigervnc-standalone-server tigervnc-common -y
# Configure VNC password
vncpasswd # Set password (e.g., "robotics123")
# Start VNC server
vncserver :1 -geometry 1920x1080 -depth 24
# Connect from your local machine:
# ssh -L 5901:localhost:5901 -i physical-ai-key.pem ubuntu@<EC2-IP>
# Then use VNC client (RealVNC, TigerVNC) to connect to localhost:5901
Option B: Azure Virtual Machine
Step 1: Create Azure Account
- Visit: https://azure.microsoft.com/
- Sign up ($200 free credits for new users)
- Navigate to Virtual Machines
Step 2: Create GPU VM
- Create Resource → Virtual Machine
- Basics:
- VM name: "physical-ai-vm"
- Region: East US (cheaper GPUs)
- Image: Ubuntu Server 22.04 LTS
- Size: NC6s_v3 (V100, 6 vCPU, 112GB)
- Administrator Account: SSH public key
- Disks: 256GB Premium SSD
- Networking: Allow SSH (22), RDP (3389)
- Review + Create
Step 3: Connect and Configure
# SSH to Azure VM
ssh azureuser@<VM-PUBLIC-IP>
# Install NVIDIA drivers (Azure CUDA image includes drivers)
nvidia-smi # Should show V100
# Install ROS 2 (same as AWS steps above)
Cost Optimization Tips
Stop Instance When Not Using
# AWS: Stop instance (preserves data, no compute charges)
aws ec2 stop-instances --instance-ids i-xxxxx
# AWS: Start instance when needed
aws ec2 start-instances --instance-ids i-xxxxx
# Savings: ~70% reduction in costs by stopping when idle
Use Spot Instances (Advanced)
- Spot Instances: 60-90% cheaper than on-demand
- Risk: Can be terminated if AWS needs capacity
- Use Case: Training ML models (Module 3-4), not for 24/7 dev
# Launch spot instance
aws ec2 request-spot-instances \
--spot-price "0.20" \
--instance-count 1 \
--type "one-time" \
--launch-specification file://spot-spec.json
Snapshot Your Setup
# AWS: Create AMI snapshot after setup
aws ec2 create-image \
--instance-id i-xxxxx \
--name "physical-ai-ros2-setup" \
--description "ROS 2 + Isaac Sim configured"
# Future launches: Use your custom AMI instead of re-installing
Verification Checklist
- Instance Running: AWS/Azure console shows "Running"
- SSH Access:
sshconnection succeeds - GPU:
nvidia-smishows GPU model and driver - ROS 2:
ros2 run demo_nodes_cpp talkerworks - Remote Desktop: VNC connection displays Ubuntu desktop
- Cost Monitoring: Billing alerts configured (AWS CloudWatch/Azure Cost Management)
Example: Running Isaac Sim on Cloud
# SSH with X11 forwarding for GUI (slower than VNC)
ssh -X -i key.pem ubuntu@<IP>
# OR use VNC for better performance
vncserver :1 -geometry 1920x1080
# Install Isaac Sim (via Omniverse Launcher)
# Note: Cloud instances may have limited internet bandwidth
# Download takes 30-60 minutes for ~50GB
Limitations
| Limitation | Impact | Mitigation |
|---|---|---|
| Network Latency | Remote desktop lag (200-500ms) | Use VNC, optimize window size |
| Ongoing Costs | $50-$200/month | Stop instances when idle, use spot |
| Data Transfer | Costs for uploading datasets | Use S3/Azure Blob for storage |
| Setup Time | Initial configuration | Create AMI/snapshot for future use |
Cost Comparison Table
| Setup | Initial | Monthly (3 months) | Total (Course) | Best For |
|---|---|---|---|---|
| Workstation | $600-$2,500 | $0 | $600-$2,500 | Long-term investment |
| Edge Kit | $550 | $0 | $550 | Physical robots |
| Cloud (AWS g4dn) | $0 | $30-$40 | $90-$120 | No hardware, budget-friendly |
| Cloud (Azure V100) | $0 | $60-$80 | $180-$240 | Powerful GPUs, RL training |
Next Steps
- Setup Billing Alerts: Configure AWS/Azure to alert at $50, $100
- Create Snapshot: Save configured instance as custom image
- Test GPU: Run
nvidia-smiand verify CUDA toolkit - Start Learning: Begin Module 1: ROS 2
Questions? Refer to the Glossary for terminology or consult cloud provider documentation.
Alternatives:
- Workstation Setup - Best for long-term use
- Edge Kit Setup - For physical robot deployment