Mount Folder to Docker* Container

Loading big datasets or models can take more time. To import models and datasets that exist on your host faster, you can mount your directory with data to the Docker container with Workbench.

To mount a directory with data to the Docker container, add parameters to the command to run the container. For example, you have a big dataset (or a model) in the path: /localdisk/datasets/big_dataset and want to import this dataset to the Workbench. Follow the steps below:

  1. Stop running the Docker container using the following command:
    docker stop workbench
  2. Remove the existing container:
    docker rm workbench
  3. Copy a path to the folder that contains your data. For example, if your dataset is in /localdisk/datasets/big_dataset, you should copy the path /localdisk/datasets/.
  4. Run the Docker container to mount the folder with your dataset using the following command:
docker run -p 127.0.0.1:5665:5665 \
--name workbench \
--privileged \
-v /dev/bus/usb:/dev/bus/usb \
-v /dev/dri:/dev/dri \
-v /localdisk/datasets/:/home/openvino/workbench/datasets \
-e PROXY_HOST_ADDRESS=0.0.0.0 \
-e PORT=5665 \
-e http_proxy=<http-proxy> \
-e https_proxy=<https-proxy> \
-it workbench

This command runs the Docker container named workbench with the following arguments:

Argument Explanation
-p 127.0.0.1:5665:5665 Maps the Docker container port 5665 to the host port 5665 to get access to DL Workbench from a web browser.
--priveleged Enables full container capabilities.
-v /dev/bus/usb:/dev/bus/usb Mounts directory /dev/bus/usb to the Docker container and enables the container to use a GPU device in DL Workbench.
-v /dev/dri:/dev/dri Mounts directory /dev/dri to the Docker container and enables the container to use a GPU device in DL Workbench.
-v /localdisk/datasets/:/home/openvino/workbench/datasets Mounts the local folder /localdisk/datasets/ to /home/openvino/workbench/datasets in the container.
-e https_proxy=<https-proxy>
and
-e http_proxy=<http-proxy>
Optional. If you are behind a corporate proxy, set environment variables.
-it Enables interactive processes in the DL Workbench terminal. Set to the Docker image name workbench.

Once the command executes, you can add your local dataset or model. For more information, see Select Models and Select Datasets.

NOTE: In the Select Model or Select Dataset section, specify the path to your folder with .xml and .bin files as follows: /home/openvino/workbench/models/<model> or /home/openvino/workbench/datasets/<dataset>.

For more information about mounting volumes to a Docker container, go to the Docker website.