MIVisionX docker
Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Read More
Docker workflow on Ubuntu 20.04/22.04
Prerequisites
- Ubuntu
20.04
/22.04
- ROCm supported hardware
- Install ROCm with
--usecase=rocm
- Docker
Workflow
- Step 1 - Get latest docker image
sudo docker pull mivisionx/ubuntu-20.04:latest
- NOTE: Use the above command to bring in latest changes from upstream
- Step 2 - Run docker image
Run docker image: Local Machine
sudo docker run -it --privileged --device=/dev/kfd --device=/dev/dri --device=/dev/mem --cap-add=SYS_RAWIO --group-add video --shm-size=4g --ipc="host" --network=host mivisionx/ubuntu-20.04:latest
- Test - Computer Vision Workflow
python3 /workspace/MIVisionX/tests/vision_tests/runVisionTests.py --num_frames 1
- Test - Neural Network Workflow
python3 /workspace/MIVisionX/tests/neural_network_tests/runNeuralNetworkTests.py --profiler_level 1
- Test - Khronos OpenVX 1.3.0 Conformance Test
python3 /workspace/MIVisionX/tests/conformance_tests/runConformanceTests.py --backend_type HOST
Option 1: Map localhost directory on the docker image
- option to map the localhost directory with data to be accessed on the docker image
- usage: -v {LOCAL_HOST_DIRECTORY_PATH}:{DOCKER_DIRECTORY_PATH}
sudo docker run -it -v /home/:/root/hostDrive/ --privileged --device=/dev/kfd --device=/dev/dri --device=/dev/mem --cap-add=SYS_RAWIO --group-add video --shm-size=4g --ipc="host" --network=host mivisionx/ubuntu-20.04:latest
Option 2: Display with docker
-
Using host display for docker
xhost +local:root sudo docker run -it --privileged --device=/dev/kfd --device=/dev/dri --cap-add=SYS_RAWIO --device=/dev/mem --group-add video --network host --env DISPLAY=$DISPLAY --volume="$HOME/.Xauthority:/root/.Xauthority:rw" --volume /tmp/.X11-unix/:/tmp/.X11-unix mivisionx/ubuntu-20.04:latest
- Test display with MIVisionX sample
runvx -v /opt/rocm/share/mivisionx/samples/gdf/canny.gdf
Run docker image with display: Remote Server Machine
sudo docker run -it --privileged --device=/dev/kfd --device=/dev/dri --cap-add=SYS_RAWIO --device=/dev/mem --group-add video --network host --env DISPLAY=$DISPLAY --volume="$HOME/.Xauthority:/root/.Xauthority:rw" --volume /tmp/.X11-unix/:/tmp/.X11-unix mivisionx/ubuntu-20.04:latest
- Test display with MIVisionX sample
runvx -v /opt/rocm/share/mivisionx/samples/gdf/canny.gdf
Build - dockerfiles
sudo docker build --build-arg {ARG_1_NAME}={ARG_1_VALUE} [--build-arg {ARG_2_NAME}={ARG_2_VALUE}] -f {DOCKER_FILE_NAME}.dockerfile -t {DOCKER_IMAGE_NAME} .
Run - docker
sudo docker run -it --privileged --device=/dev/kfd --device=/dev/dri --cap-add=SYS_RAWIO --device=/dev/mem --group-add video --network host --env DISPLAY=$DISPLAY --volume="$HOME/.Xauthority:/root/.Xauthority:rw" --volume /tmp/.X11-unix/:/tmp/.X11-unix {DOCKER_IMAGE_NAME}
Ubuntu 20
/22
DockerFiles
-
new component added to the level
-
existing component from the previous level
Build Level | MIVisionX Dependencies | Modules | Libraries and Executables | Docker File |
---|---|---|---|---|
Level_1 |
cmake gcc g++ |
amd_openvx utilities |
libopenvx.so - OpenVX™ Lib - CPU libvxu.so - OpenVX™ immediate node Lib - CPU runvx - OpenVX™ Graph Executor - CPU with Display OFF |
level-1.dockerfile |
Level_2 |
ROCm OpenCL +Level 1 |
amd_openvx amd_openvx_extensions utilities |
libopenvx.so - OpenVX™ Lib - CPU/GPU libvxu.so - OpenVX™ immediate node Lib - CPU/GPU libvx_loomsl.so - Loom 360 Stitch Lib loom_shell - 360 Stitch App runcl - OpenCL™ program debug App runvx - OpenVX™ Graph Executor - Display OFF |
level-2.dockerfile |
Level_3 |
OpenCV FFMPEG +Level 2 |
amd_openvx amd_openvx_extensions utilities |
libopenvx.so - OpenVX™ Lib libvxu.so - OpenVX™ immediate node Lib libvx_loomsl.so - Loom 360 Stitch Lib loom_shell - 360 Stitch App runcl - OpenCL™ program debug App libvx_amd_media.so - OpenVX™ Media Extension libvx_opencv.so - OpenVX™ OpenCV InterOp Extension mv_compile - Neural Net Model Compile runvx - OpenVX™ Graph Executor - Display ON |
level-3.dockerfile |
Level_4 |
MIOpenGEMM MIOpen ProtoBuf +Level 3 |
amd_openvx amd_openvx_extensions apps utilities |
libopenvx.so - OpenVX™ Lib libvxu.so - OpenVX™ immediate node Lib libvx_loomsl.so - Loom 360 Stitch Lib loom_shell - 360 Stitch App libvx_amd_media.so - OpenVX™ Media Extension libvx_opencv.so - OpenVX™ OpenCV InterOp Extension mv_compile - Neural Net Model Compile runcl - OpenCL™ program debug App runvx - OpenVX™ Graph Executor - Display ON libvx_nn.so - OpenVX™ Neural Net Extension inference_server_app - Cloud Inference App |
level-4.dockerfile |
Level_5 |
AMD_RPP AMD RPP deps +Level 4 |
amd_openvx amd_openvx_extensions apps VX RPP utilities |
libopenvx.so - OpenVX™ Lib libvxu.so - OpenVX™ immediate node Lib libvx_loomsl.so - Loom 360 Stitch Lib loom_shell - 360 Stitch App libvx_amd_media.so - OpenVX™ Media Extension libvx_opencv.so - OpenVX™ OpenCV InterOp Extension mv_compile - Neural Net Model Compile runcl - OpenCL™ program debug App runvx - OpenVX™ Graph Executor - Display ON libvx_nn.so - OpenVX™ Neural Net Extension inference_server_app - Cloud Inference App libvx_rpp.so - OpenVX™ RPP Extension |
level-5.dockerfile |