Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 2.6 KB

README.adoc

File metadata and controls

56 lines (40 loc) · 2.6 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 and lib gomp1 (required for XGBoost) - 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.

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. By default, this script builds an image for both Intel and ARM64 (Apple Silicon) architectures using the new Docker builder buildx. See the dockerbuild.sh script if you didn’t enable the new 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

In order 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 that MyBinder.org has to build the image from scratch that leads to prolonged startup times.