Installation

Installing Docker

Introduction

If you run the LEAN engine locally with the CLI, LEAN executes in a Docker container. These Docker containers contain a minimal Linux-based operating system, the LEAN engine, and all the packages available to you on QuantConnect.com. It is therefore required to install Docker if you plan on using the CLI to run the LEAN engine locally.

The installation instructions on this page should be sufficient for most users. For more comprehensive instructions, see Get Docker in the Docker documentation.

Install on Windows

To install Docker on Windows, your computer must meet the following requirements:

  • A 64-bit processor
  • 4GB RAM or more
  • Windows 10, version 1903 or higher (released May 2019)
  • Hardware virtualization enabled in the BIOS

If you meet the requirements, follow these steps to install Docker on your computer:

  1. Download Docker Desktop Installer.exe.
  2. Run the downloaded installer and ensure the Enable WSL 2 Features check box is selected when prompted for it.
  3. Follow the instructions in the installation wizard to complete the installation.
  4. Restart your computer to ensure changes are propagated.

After you install Docker and restart your computer, if Docker prompts you that the WSL 2 installation is incomplete, follow the instructions in the dialog shown by Docker to finish the WSL 2 installation.

By default, Docker doesn't automatically start when your computer starts. So, when you run the LEAN engine with the CLI for the first time after starting your computer, you must manually start Docker. To automatically start Docker, open the Docker Desktop application, click Settings > General, and then enable the Start Docker Desktop when you log in check box.

Install on macOS

To install Docker on Mac, your computer must meet the following requirements:

  • Mac hardware from 2010 or newer with an Intel processor
  • macOS 10.14 or newer (Mojave, Catalina, or Big Sur)
  • 4GB RAM or more

If you meet the requirements, follow these steps to install Docker on your Mac:

  1. If you're using a Mac with an Apple chip, run softwareupdate --install-rosetta in a terminal to install Rosetta 2.
  2. Download Docker.dmg for Intel chips or Docker.dmg for Apple chips depending on the chip your Mac contains.
  3. Double-click Docker.dmg to open the installer.
  4. Drag the Docker icon to the Applications folder to install it.
  5. Double-click Docker.app in the Applications folder to start Docker.
  6. If your Mac has an M1 chip, open a terminal and run the following commands:
    $ sudo hdiutil attach Docker.dmg
    $ sudo /Volumes/Docker/Docker.app/Contents/MacOS/install
    $ sudo hdiutil detach /Volumes/Docker

Install on Linux

The installation instructions on Linux differ per distribution. To learn how to install Docker on your distribution, see Install Docker Desktop on Linux in the Docker documentation.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: