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.

Go to the course

What you'll see in this lesson

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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

Sign in with your Google account to access this lesson and the whole course.

Go to the courseSee the full syllabus

More lessons in this block