Work with Docker* Container

When working with the application inside a Docker* container, you might need to:

Refer to the sections below to see instructions for each scenario.

NOTE: Some commands differ among the detached and interactive modes of a container. To learn about the modes, see Install from Docker* Hub.

Pause and Resume Docker Container

To pause a container with the DL Workbench while keeping all your data in it, stop the container and then restart it later to the previous state with the commands below:

  1. Stop the container:
    • When the container was run with the script and in detached mode:
      ./start_workbench.sh -STOP <container-name>
    • When the container was run with the docker run command and in detached mode:
      docker stop workbench
    • When the container was run in interactive mode:
      Ctrl + C
  2. Restart the container:
    • In interactive mode:
      ./start_workbench -RESTART <container-name>
    • In detached mode:
      ./start_workbench -RESTART <container-name> -DETACHED
    • Using docker start in detached mode:
      docker start <container-name>
    • Using docker start in interactive mode:
      docker start -ai <container-name>

Run New Docker Container with DL Workbench

To start a new Docker container with the DL Workbench, stop and remove the current container, then run a new one.

1. Pause Container

  • When the container was run with the script and in detached mode:
    ./start_workbench.sh -STOP <container-name>
  • When the container was run with the docker run command and in detached mode:
    docker stop workbench
  • In the interactive mode:
    Ctrl + C

2. Remove Container

docker rm workbench

NOTE: The rm command clears all loaded models, datasets, experiments, and profiling data.

3. Run New Container

The command below runs a new container on Linux OS in the interactive mode. To run the DL Workbench on other operating systems and with different parameters, see Install the DL Workbench from Docker Hub.

docker run -p 127.0.0.1:5665:5665 \
--name workbench \
--device /dev/dri \
-v /dev/bus/usb:/dev/bus/usb \
--device-cgroup-rule='c 189:* rmw' \
-it openvino/workbench

Once the command executes, open the link https://127.0.0.1:5665 in your browser, and the DL Workbench Get Started page appears:

See Enter DL Workbench for details.

Update Docker Container

To get the latest version of the application in your Docker container, pause the container, pull the latest version, and run the container.

1. Pause Container

  • When the container was run with the script and in detached mode:
    ./start_workbench.sh -STOP <container-name>
  • When the container was run with the docker run command and in detached mode:
    docker stop workbench
  • When the container was run in interactive mode:
    Ctrl + C

2. Pull the Latest Version of the DL Workbench

docker pull openvino/workbench

3. Run Container

docker run -p 127.0.0.1:5665:5665 \
--name workbench \
--device /dev/dri \
-v /dev/bus/usb:/dev/bus/usb \
--device-cgroup-rule='c 189:* rmw' \
-it openvino/workbench

For full instructions on running a container and description of the arguments in the command above, see the Install from Docker* Hub page.

Once the command executes, open the link https://127.0.0.1:5665 in your browser, and the DL Workbench Get Started page appears:

Enter Docker Container with DL Workbench

NOTE: For this step, the container must be running.

1. Enter Container

To enter the container, run the command:

docker exec -it workbench /bin/bash

This command creates a new instance of a shell in the running Docker container and gives you access to a bash console as an OpenVINO™ user.

2. See Available Files

The container directory displayed in the terminal is /opt/intel/openvino_2021/deployment_tools/tools/workbench/.

To see a list of files available inside the container, run ls.

NOTE: The /opt/intel/openvino/deployment_tools/tools/workbench/ directory inside the container includes a service folder wb/data. Make sure you do not apply any changes to it.

3. Inspect Entry Point

cat docker-entrypoint.sh

4. Exit Container

To exit the container, run exit inside the container.


See Also