Skip to content

Latest commit

 

History

History
90 lines (73 loc) · 16.8 KB

README.md

File metadata and controls

90 lines (73 loc) · 16.8 KB

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

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

  • #c5f015 new component added to the level
  • #1589F0 existing component from the previous level
Build Level MIVisionX Dependencies Modules Libraries and Executables Docker File
Level_1 cmake
gcc
g++
amd_openvx
utilities
#c5f015 libopenvx.so - OpenVX™ Lib - CPU
#c5f015 libvxu.so - OpenVX™ immediate node Lib - CPU
#c5f015 runvx - OpenVX™ Graph Executor - CPU with Display OFF
level-1.dockerfile
Level_2 ROCm OpenCL
+Level 1
amd_openvx
amd_openvx_extensions
utilities
#c5f015 libopenvx.so - OpenVX™ Lib - CPU/GPU
#c5f015 libvxu.so - OpenVX™ immediate node Lib - CPU/GPU
#c5f015 libvx_loomsl.so - Loom 360 Stitch Lib
#c5f015 loom_shell - 360 Stitch App
#c5f015 runcl - OpenCL™ program debug App
#c5f015 runvx - OpenVX™ Graph Executor - Display OFF
level-2.dockerfile
Level_3 OpenCV
FFMPEG
+Level 2
amd_openvx
amd_openvx_extensions
utilities
#1589F0 libopenvx.so - OpenVX™ Lib
#1589F0 libvxu.so - OpenVX™ immediate node Lib
#1589F0 libvx_loomsl.so - Loom 360 Stitch Lib
#1589F0 loom_shell - 360 Stitch App
#1589F0 runcl - OpenCL™ program debug App
#c5f015 libvx_amd_media.so - OpenVX™ Media Extension
#c5f015 libvx_opencv.so - OpenVX™ OpenCV InterOp Extension
#c5f015 mv_compile - Neural Net Model Compile
#c5f015 runvx - OpenVX™ Graph Executor - Display ON
level-3.dockerfile
Level_4 MIOpenGEMM
MIOpen
ProtoBuf
+Level 3
amd_openvx
amd_openvx_extensions
apps
utilities
#1589F0 libopenvx.so - OpenVX™ Lib
#1589F0 libvxu.so - OpenVX™ immediate node Lib
#1589F0 libvx_loomsl.so - Loom 360 Stitch Lib
#1589F0 loom_shell - 360 Stitch App
#1589F0 libvx_amd_media.so - OpenVX™ Media Extension
#1589F0 libvx_opencv.so - OpenVX™ OpenCV InterOp Extension
#1589F0 mv_compile - Neural Net Model Compile
#1589F0 runcl - OpenCL™ program debug App
#1589F0 runvx - OpenVX™ Graph Executor - Display ON
#c5f015 libvx_nn.so - OpenVX™ Neural Net Extension
#c5f015 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
#1589F0 libopenvx.so - OpenVX™ Lib
#1589F0 libvxu.so - OpenVX™ immediate node Lib
#1589F0 libvx_loomsl.so - Loom 360 Stitch Lib
#1589F0 loom_shell - 360 Stitch App
#1589F0 libvx_amd_media.so - OpenVX™ Media Extension
#1589F0 libvx_opencv.so - OpenVX™ OpenCV InterOp Extension
#1589F0 mv_compile - Neural Net Model Compile
#1589F0 runcl - OpenCL™ program debug App
#1589F0 runvx - OpenVX™ Graph Executor - Display ON
#1589F0 libvx_nn.so - OpenVX™ Neural Net Extension
#1589F0 inference_server_app - Cloud Inference App
#c5f015 libvx_rpp.so - OpenVX™ RPP Extension
level-5.dockerfile