Get Started with ML Workbench Sandbox

This page walks you through running the TigerGraph ML Workbench in a Docker container.

To help you get started quickly, we provide a “sandbox” Docker image that has the TigerGraph database and ML Workbench pre-installed. The “Cora” dataset and the IMDB datasets used for tutorials are also preloaded into the database.

Use this link to download Docker if needed: Get Docker

1. Prerequisites

  • You machine meets the Hardware and Software Requirements.

    • Make sure you are allocating enough CPU and memory to your Docker containers. TigerGraph recommends allocating at least 8 CPUs and 16 GB of memory.

  • Docker Desktop is running on your machine.

2. Procedure

  1. Run the following command to pull the Workbench image, bind ports, map a shared data folder, and start a container from the image

    docker run -it -p 14022:22 -p 8888:8888 -p 9000:9000 -p 14240:14240 -p 6006:6006  --name tgsandbox --ulimit nofile=1000000:1000000 -v ~/tgsandbox:/home/tigergraph/tgsandbox/save tigergraphml/sandbox:1.4.0

    Here is a breakdown of the parameters in the previous command:

    • -it: run the container interactively and allocate a pseudo-TTY. If you’d rather run the container non-interactively, use -d instead. You can use docker logs to retrieve the URL for JupyterLab.

    • -p: map a port of the host (14022) to a port of the container (22).

      • Port 22: SSH server

      • Ports 9000 and 14240: TigerGraph database

      • Port 8888: ML Workbench

      • Port 6006: Tensorboard.

    • --name: name of the container. The command sets the name to tgsandbox, but you can change this to another name.

    • --ulimit: the limit of number of open file descriptors per process.

    • -v: mount a folder on the host (~/tgsandbox) to a folder in the container (/home/tigergraph/tgsandbox). These two folders are synced, allowing you to save any file even after the container is removed. However, the folder on the host (~/tgsandbox) has to be writable by the user inside the container. Normally, this can be ensured by making the folder public, e.g., chmod 777 ~/tgsandbox. If you are using Windows, change the path using Windows file system conventions. For example, C:\tgsandbox instead of ~/tgsandbox.

    This command prints the link to the JupyterLab workbench in a format similar to Use this link in your browser to access the workbench, which is a customized version of JupyterLab.

If the Docker container is running remotely, open port 8888 on the remote machine to allow the connection. Then replace in the returned address with the remote machine IP address.
  1. If you want shell access to your Docker container, run the following command:

    $ ssh -p 14022 tigergraph@localhost

    When prompted for the password for user tigergraph, enter tigergraph.

    Alternatively, if you don’t have access to ssh, you can get shell access through docker exec:

    $ docker exec -it $(docker ps | grep tgsandbox | awk '{print $1}') /bin/sh
  2. If you turn off the sandbox container and start the container again, JupyterLab starts automatically as soon as the container starts. However, JupyterLab generates a new token everytime it restarts. You can retrieve the URL with the token by running docker logs tgsandbox, or click the container in the Docker Desktop UI to retrieve the URL from the latest terminal output.

3. Next steps

The next step after installation is activation.

Then you can train your first model by following the tutorials.