Building Your First Tiny AI Lab: The Basic Requirements

 

Building Your First Tiny AI Lab: The Basic Requirements

One of the best things about learning modern infrastructure and AI engineering today is that you no longer need expensive enterprise hardware to get started.

You can build a surprisingly capable learning environment using:

  • A Raspberry Pi
  • A normal laptop
  • Free open-source tools
  • A little patience and curiosity

This project is designed to teach professional infrastructure concepts in a practical and approachable way.

We are not just learning commands.

We are building the foundations for:

  • Containers
  • Automation
  • Kubernetes
  • AI infrastructure
  • Platform engineering
  • Home lab clusters
  • Distributed systems

And we are doing it on hardware that most people already own.


The Goal

The long-term goal is to build a lightweight but professional infrastructure platform that eventually scales across multiple Raspberry Pis using:

  • Kubernetes
  • Helm
  • Podman
  • Container workloads
  • AI services

But before we get there, we start with something much simpler:

  • A virtual machine
  • A container runtime
  • A web server
  • A single HTML page

Simple systems are easier to understand, troubleshoot, and improve.

That is exactly how real engineers learn.


Hardware Requirements

The beauty of this setup is that the requirements are very modest.

You can use either:

  • A Raspberry Pi 4 or 5
  • Or a normal laptop or desktop

Recommended minimum specs:

  • 8GB RAM preferred
  • 4 CPU cores ideal
  • Around 20GB free disk space

Even older hardware works surprisingly well for Linux and container labs.


Software Requirements

Terminal Access

You will need a terminal application.

macOS

Install:

  • iTerm2

It is far more comfortable than the default macOS terminal and widely used by engineers.

Windows

Install:

  • PuTTY

This gives you SSH and terminal access into Linux systems.


Virtualisation Platform

We need a way to create repeatable Linux virtual machines.

Install:

  • VirtualBox

VirtualBox allows us to run Linux environments safely inside our normal operating system.

This means:

  • Easy experimentation
  • Safe testing
  • Rebuildable environments
  • Isolation from your main machine

These are important concepts in modern infrastructure engineering.


Infrastructure Automation with Vagrant

Next install:

  • Vagrant

Vagrant lets us define virtual machines as code.

Instead of manually building systems every time, we create reusable configurations.

That is a massive professional skill.

Infrastructure-as-code is used everywhere:

  • Cloud platforms
  • DevOps pipelines
  • AI infrastructure
  • Enterprise automation

Vagrant VMware Utility Driver

If you later move to VMware environments, you should also install:

  • Vagrant VMware Utility

For now we are using VirtualBox, but this prepares the project for more advanced environments later.

Professional infrastructure often moves between:

  • Local labs
  • Enterprise virtualisation
  • Cloud environments
  • Bare metal clusters

Learning portability early is extremely valuable.


Our First Environment

The first environment is intentionally lightweight.

It creates:

  • Ubuntu Linux
  • Podman containers
  • Apache web server
  • A basic HTML page

This gives us our first working infrastructure platform.

Even though it is small, it already introduces:

  • Virtualisation
  • Linux administration
  • Containers
  • Networking
  • Infrastructure automation
  • Service deployment

These are real-world engineering skills.


The Vagrantfile

Here is the full starting configuration:

Vagrant.configure("2") do |config|
 config.vm.box = "bento/ubuntu-24.04"

 config.vm.provider "VirtualBox" do |v|
   v.memory = 4096
   v.cpus = 2
 end

 config.vm.synced_folder ".", "/vagrant", disabled: true

 config.vm.network "public_network",
   ip: "192.168.1.253",
   use_dhcp_assigned_default_route: true

 config.vm.provision "shell", inline: <<-SHELL

      sudo apt update -y

      # sudo apt upgrade -y
      # openssh server upgrade stops build in 1 step

      sudo ufw disable
      sudo systemctl stop apparmor
      sudo systemctl disable apparmor

      sudo sed -i '/swap/d' /etc/fstab
      sudo swapoff -a

      echo "192.168.1.253 aionpi" >> /etc/hosts

      groupadd docker
      usermod -aG docker vagrant

      sudo apt -y install podman
      sudo apt -y install podman-compose

      mkdir /home/vagrant/html

      cat <<-'EOF' > /home/vagrant/compose.yaml
services:
 nginx:
   image: docker.io/library/httpd
   ports:
     - 8080:80
   volumes:
     - /home/vagrant/html/:/usr/local/apache2/htdocs
EOF

     cat <<-'EOF' > /home/vagrant/html/index.html
hello world
EOF

      podman compose -f /home/vagrant/compose.yaml up -d

  SHELL
end

At first glance this may look complicated.

But it is actually doing something very exciting:
it is building an entire infrastructure environment automatically.


What This Configuration Does

Let’s break it down.

Creates an Ubuntu VM

config.vm.box = "bento/ubuntu-24.04"

This downloads and launches a clean Ubuntu Linux machine.

Completely automated.


Allocates Resources

v.memory = 4096
v.cpus = 2

The VM receives:

  • 4GB RAM
  • 2 CPU cores

Enough for lightweight container workloads.


Configures Networking

config.vm.network "public_network",
 ip: "192.168.1.253"

This gives the VM its own IP address on your home network.

That means you can access services directly from your browser.


Installing Podman

Inside the provisioning section we install:

  • Podman
  • Podman Compose
sudo apt -y install podman
sudo apt -y install podman-compose

This gives us a modern container platform without needing Docker.

Podman is especially popular in enterprise Linux environments.


Creating the Apache Container

Next we generate a simple compose file automatically:

services:
 nginx:
   image: docker.io/library/httpd

Despite the service being named nginx, we are actually running the Apache HTTPD container image.

This is common in early labs and a good reminder that naming matters in infrastructure projects.

Later we will improve and standardise these configurations properly.


Creating a Simple Website

Finally we generate a tiny HTML file:

hello world

Very small.
Very simple.

But incredibly important.

Because this proves:

  • The VM works
  • Networking works
  • Containers work
  • Apache works
  • Automation works

That is already a complete infrastructure stack.


Starting the Environment

Once everything is installed:

vagrant up

Vagrant will:

  • Download Ubuntu
  • Create the VM
  • Configure networking
  • Install Podman
  • Create the compose file
  • Launch the Apache container

All automatically.

That is infrastructure automation in action.


Testing the Website

Open your browser and visit:

http://192.168.1.253:8080

If everything worked correctly, you should see:

hello world

Your first container platform is running.


Why This Matters

This tiny project teaches the same foundational ideas used in:

  • Enterprise Kubernetes clusters
  • Cloud-native platforms
  • AI infrastructure
  • DevOps engineering
  • Platform engineering

The scale is smaller.
The concepts are the same.

That is the key lesson.


What Comes Next

Future posts will gradually evolve this environment into:

  • Multi-container applications
  • Git workflows
  • Private registries
  • Kubernetes clusters
  • Helm deployments
  • AI inference services
  • Monitoring stacks
  • Raspberry Pi clusters

Eventually we will move from:

  • One VM
  • To multiple VMs
  • To physical Raspberry Pis
  • To distributed Kubernetes environments

And everything begins right here with:

  • Vagrant
  • Podman
  • Apache
  • One tiny HTML page

That is how professional infrastructure journeys begin.

Comments

Popular posts from this blog

Don’t Be Afraid to Experiment

Learning Databases and Big Data

Build Your Own Agentic AI Platform