- If you are a developer and want to configure your system for DL Workbench development, refer to Configure for Development section.
-
Install prerequisites:
git
python3.6
-
Clone the DL Workbench repository:
git clone https://github.com/openvinotoolkit/workbench.git
-
Run the script to bootstrap os from the root folder of the DL Workbench repository:
bash automation/bootstrap/bootstrap_os.sh
-
(Optional) Set up the workspace in PyCharm
- Open the workbench project in PyCharm
- Open the
automation/bootstrap/bootstrap_pycharm.py
- Right click inside the script and choose
Run 'bootstrap_pycharm.py'
- Restart PyCharm
-
Install prerequisites:
git
python3.6
-
Download the OpenVINO package and install it (follow the instruction) The full link to the current package you can find in
openvino_version.yml
in the private CI repository. -
Open the terminal and clone the DL Workbench repository:
git clone https://github.com/openvinotoolkit/workbench.git cd workbench export OPENVINO_WORKBENCH_ROOT=$(pwd)
-
Initialize and clone submodules of the repository:
git submodule update --init --recursive
-
Install the
virtualenv
python package:python3 -m pip install virtualenv
-
Create a python virtual environment:
python3 -m virtualenv ${OPENVINO_WORKBENCH_ROOT}/.venv
-
Initialize the OpenVINO environment:
source ~/intel/openvino_2022.4.653/setupvars.sh
-
Install OpenVINO console tools (Accuracy Checker, POT, Benchmark App, Model Optimizer) from wheels:
source ${OPENVINO_WORKBENCH_ROOT}/.venv/bin/activate python -m pip install ${INTEL_OPENVINO_DIR}/tools/wheels/openvino-2022.1.0-5583-cp36-cp36m-manylinux2014_x86_64.whl python -m pip install ${INTEL_OPENVINO_DIR}/tools/wheels/openvino_dev-2022.1.0-5583-py3-none-any.whl deactivate
Make sure to substitute
cp36-cp36m
in openvino runtime wheel with your Python version. -
Install requirements of DL Workbench:
source ${OPENVINO_WORKBENCH_ROOT}/.venv/bin/activate python -m pip install -r ${OPENVINO_WORKBENCH_ROOT}/requirements/requirements.txt python -m pip install -r ${OPENVINO_WORKBENCH_ROOT}/requirements/requirements_dev.txt python -m pip install -r ${OPENVINO_WORKBENCH_ROOT}/requirements/requirements_jupyter.txt python -m pip install -r ${OPENVINO_WORKBENCH_ROOT}/client/automation/requirements_dev.txt python -m pip install -r ${OPENVINO_WORKBENCH_ROOT}/model_analyzer/requirements.txt deactivate
-
Create a environment for models conversion:
python3 -m virtualenv ${OPENVINO_WORKBENCH_ROOT}/.unified_venv source ${OPENVINO_WORKBENCH_ROOT}/.unified_venv/bin/activate python3 -m pip install -r ${INTEL_OPENVINO_DIR}/tools/model_optimizer/requirements_tf2.txt python3 -m pip install -r ${INTEL_OPENVINO_DIR}/extras/open_model_zoo/tools/model_tools/requirements.in python3 -m pip install -r ${INTEL_OPENVINO_DIR}/extras/open_model_zoo/tools/model_tools/requirements-pytorch.in python3 -m pip install -r ${INTEL_OPENVINO_DIR}/extras/open_model_zoo/tools/model_tools/requirements-caffe2.in deactivate
-
Install Node.js and install packages for the client:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm pushd ${OPENVINO_WORKBENCH_ROOT}/client nvm use --delete-prefix v14 --silent npm ci npm run init-netron popd
-
Install Git hooks:
source ${OPENVINO_WORKBENCH_ROOT}/.venv/bin/activate pre-commit install pre-commit install --hook-type pre-push deactivate
-
Install Docker
- Update the apt package index and install packages to allow apt to use a repository over HTTPS
sudo -E apt-get update sudo -E apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release
- Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- Use the following command to set up the stable repository
echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Install Docker engine
sudo -E apt-get update sudo -E apt-get install docker-ce docker-ce-cli containerd.io
- Verify that Docker Engine is installed correctly by running the hello-world image
sudo docker run hello-world
- To manage Docker as a non-root user create the docker group
sudo groupadd docker
- Add your user to the docker group
sudo usermod -aG docker $USER
- Log out and log back in so that your group membership is re-evaluated
-
Install Docker Compose
- Run this command to download the current stable release of Docker Compose
sudo -E curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- Apply executable permissions to the binary
sudo chmod +x /usr/local/bin/docker-compose
- Install command completion for the bash and zsh shell
sudo -E curl \ -L https://raw.githubusercontent.com/docker/compose/1.29.2/contrib/completion/bash/docker-compose \ -o /etc/bash_completion.d/docker-compose
- Reload your terminal. You can close and then open a new terminal, or reload your setting with source ~/.bashrc command in your current terminal.
-
Install PyCharm
-
Setup PyCharm environment
-
Open 'Edit Configurations' window and add new configuration(press plus button)
-
Select Docker->Docker-compose from the list
-
Setup settings as on the image
Property Value Compose files ./docker/docker-compose.local.yml; Environment variables LOCAL_ADDR=172.17.0.1 Services nginx, postgres, rabbitmq, -
Add another configuration, select 'npm' from the list
-
Setup settings as on the image
Property Value package.json OPENVINO_WORKBENCH_ROOT/client/package.json Command start Arguments --scripts-prepend-node-path -
Create Python configuration for Gunicorn
-
Setup settings as on the image
Property Value Script path OPENVINO_WORKBENCH_ROOT/.venv/bin/gunicorn Parameters --worker-class eventlet -w 1 -b 0.0.0.0:5676 workbench:APP --log-level DEBUG --no-sendfile --timeout 500 Working configuration OPENVINO_WORKBENCH_ROOT/.venv/bin -
Add these user environment variables for the configuration:
Property Value PYTHONUNBUFFERED 1 PYTHONPATH LD_LIBRARY_PATH INTEL_OPENVINO_DIR VENV_TF2_PYTHON OPENVINO_WORKBENCH_ROOT/.unified_venv SERVER_MODE development PUBLIC_PORT 4200 -
In terminal activate OpenVINO environment
source ~/intel/openvino_2022/setupvars.sh
-
Copy output of commands as values to the same named environment variables in PyCharm
echo $PYTHONPATH echo $LD_LIBRARY_PATH echo $INTEL_OPENVINO_DIR
-
Copy this configuration(this one will be for Celery)
-
Setup settings as on the image
Property Value Script path OPENVINO_WORKBENCH_ROOT/.venv/bin/celery Parameters -A wb.main.tasks.task worker --loglevel=DEBUG Working configuration OPENVINO_WORKBENCH_ROOT/ -
Set to user environment variable
VENV_TF2_PYTHON
this valueOPENVINO_WORKBENCH_ROOT/.unified_venv/bin/python
-
Copy this configuration(this one will be for database upgrading)
-
Setup settings as on the image
Property Value Script path OPENVINO_WORKBENCH_ROOT/.venv/bin/flask Parameters db upgrade Working configuration OPENVINO_WORKBENCH_ROOT/ -
Set to user environment variable
FLASK_APP
this valueOPENVINO_WORKBENCH_ROOT/migrations/migration:APP
-
Remove
PUBLIC_PORT
user environment variable
-
-
Run all of these configurations
-
Check http://127.0.0.1:4200 in your browser, you should see DL Workbench app
- Copy the value of the field
openvino_package
from theopenvino_version.yml
from the private CI repository file - Run the following command to download bundles from root of the repository:
python ./wb/main/utils/bundle_creator/bundle_downloader.py \
--link ${PACKAGE_LINK}/deployment_archives \
-os ubuntu18 ubuntu20 \
--output-path ./bundles \
--targets cpu gpu vpu hddl opencv python3.6 python3.7 python3.8
- Create new virtual machine with Ubuntu 18.04 OS
- Configure SSH server in guest Ubuntu OS
- Install
openssh-server
:sudo apt update sudo apt install openssh-server
- Check SSH service is running:
sudo systemctl status ssh
- Update firewall rules:
sudo ufw allow ssh
- Configure network in virtual machine as bridged network.
Your VM's IP address should be in the same network as your host machine (e.g
192.168.*.*
), not in the virtual subnet. - Test SSH connection:
Example:
ssh -p $user $user@$machine_ip_address
ssh -p 22 [email protected]
- Install
- Generate and setup SSH keys:
- Generate SSH public and private key pair:
ssh-keygen -t rsa -f ~/destination_file_path
- Copy public key to virtual machine:
ssh-copy-id -i ~/destination_file_path -p $user $user@$machine_ip_address
- Test SSH connection with private key:
ssh -i ~/destination_file_path -p $user $user@$machine_ip_address
- Generate SSH public and private key pair:
- Make sure that your VM satisfy requirement:
- Installed
python
(v3) andpip
(as a python module:python3 -m pip --version
) - Configured Internet connection (
ping -c 1 google.com
)
- Installed