Block IV · Tech kit: GitHub and Docker · Lesson 22
Docker in ten minutes: install AI apps with a single command
What an image and a container are, how to install Docker on Windows, Mac or Linux and start AI apps with docker run and docker compose. Includes volumes and backups, updates, GPU for local models and basic security.
- 11 min
- 9 animated slides
- 4-question quiz
- Narrated in 6 languages
What you'll see in this lesson
- Image and container: the recipe and the dish
An image is a package with the app and everything it needs; a container is that image running on your computer.
- Install Docker: Desktop on Windows and Mac, Engine on Linux
On Windows and Mac you install Docker Desktop, window and all; on Linux, Docker Engine, the open source engine, is enough.
- How much does it cost? License and alternatives
Docker Desktop is free for personal use and for companies with fewer than 250 employees and under 10 million dollars a year.
- docker run: your first AI app with one command
With docker run you download the image and start the container; -p opens a port and -v keeps the data outside the container.
- docker compose up -d and the .env file
Apps with several parts come with a docker-compose.yml: a single command starts the app, the database and the rest together.
- Day to day: check, stop, update and back up
Five commands cover almost everything: see what's running, read errors, stop, update and back up before touching anything.
- RAM, disk and GPU for local models
Docker shares your computer's memory; if you're going to use local models, the NVIDIA GPU is connected with a separate component.
- Security: never expose ports online without a password
A port published with -p is open to your whole network, and on a Linux server it can bypass the ufw firewall.
- Summary: Docker without fear
With four ideas and half a dozen commands you can already install almost any AI app from GitHub.
Tools and concepts
- Docker Desktop
- Docker Compose
- WSL 2
- Open WebUI
- NVIDIA Container Toolkit
- Podman
- OrbStack
Sign in with your Google account to access this lesson and the whole course.