Art of the Smart

Thoughts and lessons from a techie, entrepreneur, and curious observer of the world.


Installing AI The Docker Way (Concise Guide)

A quickstart guide of quickstart guides to get local AI running on Windows.

Installing AI The Docker Way (Concise Guide)

Want to explore AI tools like Ollama, ComfyUI, and InvokeAI without cluttering your Windows system? This guide shows you how to install them cleanly and securely using Windows Subsystem for Linux (WSL) and Docker.

Benefits

Before you start, ensure ample disk space (at least 1TB, more recommended) on your C drive, as AI tools can consume significant storage.

Key Concepts

Let’s Get Started

  1. Install WSL (how to): In PowerShell (as administrator), run wsl --install. Turn on any features it asks you to, set username to user and set a good password. Reboot.
  2. Install Docker Desktop: Download and run from the official website. Reboot.
  3. Launch WSL: Find "Ubuntu" in the Start Menu and run it, not as admin.
  4. Configure Docker Desktop: Make Docker Desktop use WSL and enable your "Ubuntu" image by opening Docker Desktop and visiting Settings => "Resources" => "WSL Integration."

Next, in order to install apps, you run code from their respective documentation. This sets up volumes for those containers to read/write data, downloads the latest version of that app, builds/installs it, and runs it.

Application Command Access URL
OpenWebUI & Ollama mkdir ~/ollama ~/open-webui && docker run -d -p 3000:8080 --gpus=all -v ~/ollama:/root/.ollama -v ~/open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama http://localhost:3000/
InvokeAI mkdir ~/invokeai ~/invokeai/imports && docker run -d -p 9090:9090 --gpus=all -v ~/invokeai:/invokeai --restart always --name invokeai --runtime=nvidia ghcr.io/invoke-ai/invokeai:latest http://localhost:9090/

I’ll add more as I find them.

Notes

Disabling Login & Authentication   If you want no logins in OpenWebUI because it’s just you using this tool, open the container in Docker Desktop, go to “Files”. Open the  /app/backend/open_webui/config.py file and, using the editor, add WEBUI_AUTH = False to line 27 so it looks like this:

...
from sqlalchemy import JSON, Column, DateTime, Integer, func
 
WEBUI_AUTH = False # Disables Login

class EndpointFilter(logging.Filter):
...

If you want logins because the kiddos are going to use this or you want extra security, leave it as-is. Do this step now if you want to change it.

Need more information? Google search for details on WSL, Docker, or specific AI tools.