Installation Tutorial for Docker Toolbox for Windows

Docker for Windows is superior to Docker Toolbox for Windows, so we strongly encourage you to upgrade to Windows 10 Professional. Using QuantRocket with Docker Toolbox is possible but is considered experimental at this point. There are certain limitations, performance may suffer, and in general more can go wrong. Please share your installation experience on the community forum as we are currently deciding whether we can/should support Docker Toolbox.

QuantRocket runs on Docker, so installing QuantRocket is a two-part process:

  • install Docker
  • install QuantRocket

Prerequisites

Docker for Windows is the preferred way to run Docker on Windows, providing a seamless integration. Docker for Windows requires Windows 10 Professional or Enterprise 64-bit. Windows 10 Home edition users are strongly encouraged to upgrade to Windows 10 Professional if possible.

Windows 10 Home edition users who do not wish to upgrade can install Docker using Docker Toolbox for Windows, a legacy solution for running Docker on Windows. This tutorial guides you through the process of running QuantRocket with Docker Toolbox for Windows.

Unlike Docker for Windows which runs natively on Windows, Docker Toolbox installs Docker inside a Virtual Box VM. Installing and configuring Docker Toolbox is somewhat less user-friendly than Docker for Windows.

Install Docker Toolbox for Windows

Visit Docker's website and download Docker Toolbox for Windows to your computer.

Run the installer, keeping the default installation values.

After the installation, double-click the Docker QuickStart icon your desktop.

Docker QuickStart

The QuickStart will open a MinGW terminal (a Linux terminal on Windows) and will finish setting up Docker Toolbox. When the process completes, the terminal window displays a prompt.

Docker QuickStart prompt

You can use the QuickStart icon in the future whenever you need to open a terminal to use QuantRocket.

Adjust Docker Virtual Box settings

The default Virtual Box VM created by the QuickStart does not provide enough resources for running QuantRocket. We recommend you create a new VM with at least 2 CPUs and 4GB of memory. Don't give Docker more than half of your system memory or your computer might be sluggish. This means your computer should have a minimum of 8 GB of memory. The more memory you give Docker, the larger the backtests and data analysis you can do.

In the Docker Quickstart Terminal, first remove the default VM:

$ docker-machine rm default

Then, re-create the default VM:

  • Choose the number of cpus with --virtualbox-cpu-count. For this example we'll use 2.
  • Choose the amount of RAM with --virtualbox-memory. Choose at least 4GB.
  • Choose the amount of disk space with --virtualbox-disk-size. In this example we'll choose 50GB.

Create the VM with the new settings:

$ docker-machine create -d virtualbox --virtualbox-cpu-count=2 --virtualbox-memory=4096 --virtualbox-disk-size=50000 default

Restart docker:

$ docker-machine stop
$ exit

Then open a new Docker Quickstart Terminal.

Install QuantRocket

To install QuantRocket, download a Docker Compose file which tells Docker how to create the QuantRocket stack. A Compose file is a YAML file that defines a multi-container Docker application.

From the Quickstart terminal, create a folder for QuantRocket under your home directory:

$ cd ~
$ mkdir quantrocket
$ cd quantrocket

Copy and paste the following command to download the latest Compose file and save to your computer:

$ curl 'https://www.quantrocket.com/composefiles/latest/local/docker-compose.yml' -o docker-compose.yml

(You can also download the Compose file from the downloads page.)

Now, use docker-compose to deploy QuantRocket:

$ cd ~/quantrocket
$ docker-compose -p quantrocket up -d

Docker Compose will read your docker-compose.yml, pull the images down from Docker Hub, and create and run containers from the images. This process takes 5-15 minutes. You will see output like this:

Output
Creating network "quantrocket_default" with the default driver
Pulling houston (quantrocket/houston:0.8.0)...
ad74af05f5a2: Pull complete
c1da3f388f16: Extracting [============================================>      ]  110.3MB/125.3MB
3f388f16: Downloading [===========================================>       ]    108MB/125.3MBte
4c2b7a4aefc0: Download complete
e61a44100a50: Download complete
8e960303c169: Waiting
f2a1d6599d9d: Waiting

You can list all the containers that are running:

$ docker ps
Output
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                           NAMES
476bd8607707        quantrocket/history:0.2.6           "/usr/bin/tini -- ..."   37 seconds ago      Up 33 seconds       80/tcp                          quantrocket_history_1
96e93387015c        quantrocket/master:0.2.11           "/usr/bin/tini -- ..."   37 seconds ago      Up 32 seconds       80/tcp                          quantrocket_master_1
fc4b87285158        quantrocket/jupyter:4.4.0.7         "/usr/bin/tini -- ..."   38 seconds ago      Up 33 seconds       80/tcp                          quantrocket_jupyter_1
...

To access the Juypter environment for your deployment, first determine the IP of your Docker virtual machine by running:

$ docker-machine ip

Note the IP address. You can now access the Jupyter environment in your browser at:

http://<your-docker-machine-ip>:1969

You may want to bookmark this URL.

In JupyterLab you'll see the JupyterLab dashboard. Open the Quickstart notebook (QuickStart.ipynb) to find an interactive tour and other resources to help you get started with QuantRocket:

JupyterLab home