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
- Ubuntu
20.04
/22.04
- ROCm supported hardware
- Install ROCm with
--usecase=graphics,rocm
- Docker
-
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
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 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
-
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
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
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} .
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}