Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.57 KB

README.adoc

File metadata and controls

60 lines (44 loc) · 2.57 KB

Roboquant Docker image

The roboquant docker image includes the following software: - Jupyter notebook image (jupyter/base-notebook) as the base image - Kotlin kernel for Jupyter - OpenJDK 17 runtime - Several Howto notebooks

Usage

You can start using roboquant with Jupyter notebooks straight out-of-the-box by running the following command:

docker run -p 8888:8888 roboquant/jupyter

Then open the url that appears in your terminal in your browser to try it out. The ./notebooks directory contains several notebooks that provide an introduction into roboquant.

For more details, see also https://roboquant.org/tutorial/install.html

Interactive Brokers only

If you also want to run the Interactive Brokers Notebook that is included, it is important to realize that the IBKR client running inside the notebook requires access to a (host) running instance of Trader Workstation or IB Gateway (recommended).

One way to accomplish this, is to connect to host.docker.internal instead of localhost. You can set the property as follows in your notebook:

Config.setProperty("ibkr.host", "host.docker.internal")

You will also have to manually copy the required client jar file after starting a notebook (due to license constraints). See the ibkr notebook for more instructions.

Build Docker Image

You can build the Docker image from the source:

  1. Clone the roboquant-notebook GitHub repository to your local disk.

  2. Then run the build script from the repository root directory:

    ./bin/dockerbuild.sh

The build script has been tested and used with Docker Desktop. This script builds an image for both amd64 and arm64 architectures using the Docker builder buildx. Read the comments in the dockerbuild.sh script if you didn’t enable this builder yet.

Please note the dockerbuild.sh script will also push the image to the Docker Hub repository. If you just want to test the docker build on your local machine, you can use the following script instead:

./bin/dockerbuild_singleplatform.sh
Note
Currently, only shell scripts are provided to build and start notebooks. So if you’re on Windows, you either have to use WSL or run the commands in the shell script from the command line manually.

MyBinder.org

To start roboquant notebooks quickly on MyBinder.org, there is a binder directory included with a `Dockerfile that retrieves the latest image from Docker Hub. This avoids MyBinder.org having to build the image from scratch that would otherwise lead to prolonged startup times.