From 30b97d5ea06c5acb7d2dbc73b0097a6ec625d452 Mon Sep 17 00:00:00 2001 From: Kiriti Gowda Date: Thu, 7 Mar 2024 14:17:09 -0800 Subject: [PATCH] Package Dependencies - Updates (#281) * Package Dependencies - Updates * Remove - --no-32 [ROCm/rocdecode commit: 5fdedf2351411e4d59f6141fc5dc618b0642f09e] --- projects/rocdecode/CMakeLists.txt | 12 ++++----- projects/rocdecode/README.md | 26 +++++++++++++------ .../docker/rocDecode-on-ubuntu20.dockerfile | 2 +- .../docker/rocDecode-on-ubuntu22.dockerfile | 2 +- projects/rocdecode/docs/install/install.rst | 20 +++++++++++++- projects/rocdecode/rocDecode-setup.py | 4 +-- 6 files changed, 47 insertions(+), 19 deletions(-) diff --git a/projects/rocdecode/CMakeLists.txt b/projects/rocdecode/CMakeLists.txt index dd24ff1343..527cfadebb 100644 --- a/projects/rocdecode/CMakeLists.txt +++ b/projects/rocdecode/CMakeLists.txt @@ -191,15 +191,15 @@ if(HIP_FOUND AND Libva_FOUND AND Libdrm_FOUND) string(REGEX MATCH "22.04" UBUNTU_22_FOUND ${OS_RELEASE}) # Set the dependent packages - set(rocDecode_DEBIAN_PACKAGE_LIST "rocm-hip-runtime, libdrm-amdgpu1, mesa-amdgpu-multimedia") - set(rocDecode_RPM_PACKAGE_LIST "rocm-hip-runtime, libdrm-amdgpu, mesa-amdgpu-multimedia") - # Set the dev dependent packages - TBD: mesa-amdgpu-multimedia-devel name will be changed to -dev - set(rocDecode_DEBIAN_DEV_PACKAGE_LIST "rocm-hip-runtime-dev, libdrm-amdgpu-dev, mesa-amdgpu-multimedia-devel, pkg-config, ffmpeg, libavcodec-dev, libavformat-dev, libavutil-dev") + set(rocDecode_DEBIAN_PACKAGE_LIST "rocm-hip-runtime, libdrm-amdgpu1, libva-amdgpu-drm2, mesa-amdgpu-va-drivers") + set(rocDecode_RPM_PACKAGE_LIST "rocm-hip-runtime, libdrm-amdgpu, libva-amdgpu, mesa-amdgpu-dri-drivers") + # Set the dev dependent packages + set(rocDecode_DEBIAN_DEV_PACKAGE_LIST "rocm-hip-runtime-dev, libdrm-amdgpu-dev, libva-amdgpu-dev, pkg-config, ffmpeg, libavcodec-dev, libavformat-dev, libavutil-dev") if(UBUNTU_22_FOUND) set(rocDecode_DEBIAN_DEV_PACKAGE_LIST "${rocDecode_DEBIAN_DEV_PACKAGE_LIST}, libstdc++-12-dev") endif() # TBD - RPM packages need Fusion Packages - "ffmpeg, libavcodec-devel, libavformat-devel, libavutil-devel" - set(rocDecode_RPM_DEV_PACKAGE_LIST "rocm-hip-runtime-devel, libdrm-amdgpu-devel, mesa-amdgpu-multimedia-devel, pkg-config") + set(rocDecode_RPM_DEV_PACKAGE_LIST "rocm-hip-runtime-devel, libdrm-amdgpu-devel, libva-amdgpu-devel, pkg-config") # '%{?dist}' breaks manual builds on debian systems due to empty Provides execute_process( @@ -325,7 +325,7 @@ else() message(FATAL_ERROR "-- ERROR!: HIP Not Found! - please install rocm-hip-runtime-dev!") endif() if(NOT Libva_FOUND) - message(FATAL_ERROR "-- ERROR!: libva Not Found - please install mesa-amdgpu-multimedia-devel!") + message(FATAL_ERROR "-- ERROR!: libva Not Found - please install libva-amdgpu-dev/libva-amdgpu-devel!") endif() if(NOT Libdrm_FOUND) message(FATAL_ERROR "-- ERROR!: libdrm Not Found - please install libdrm-amdgpu-dev/libdrm-amdgpu-devel!") diff --git a/projects/rocdecode/README.md b/projects/rocdecode/README.md index 4486edbb7e..0260841a70 100644 --- a/projects/rocdecode/README.md +++ b/projects/rocdecode/README.md @@ -20,9 +20,24 @@ access the video decoding features available on your GPU. > [!IMPORTANT] > `gfx908` or higher GPU required -* Install ROCm `6.1.0` or later with [amdgpu-install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html): Required usecases - multimediasdk and rocm +* Install ROCm `6.1.0` or later with [amdgpu-install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html): Required usecase - rocm > [!IMPORTANT] -> `sudo amdgpu-install --usecase=multimediasdk,rocm --no-32` +> `sudo amdgpu-install --usecase=rocm` + +* AMD Libdrm + ```shell + sudo apt install libdrm-amdgpu-dev + ``` + +* AMD Libva + ```shell + sudo apt install libva-amdgpu-dev + ``` + +* AMD VA Drivers + ```shell + sudo apt install mesa-amdgpu-va-drivers + ``` * CMake `3.5` or later @@ -36,11 +51,6 @@ access the video decoding features available on your GPU. sudo apt install pkg-config ``` -* AMD Libdrm - ```shell - sudo apt install libdrm-amdgpu-dev - ``` - * [FFmpeg](https://ffmpeg.org/about.html) runtime and headers - for tests and samples ```shell @@ -75,7 +85,7 @@ The installation process uses the following steps: * [ROCm-supported hardware](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html) install verification -* Install ROCm `6.1.0` or later with [amdgpu-install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html) with `--usecase=multimediasdk,rocm --no-32` +* Install ROCm `6.1.0` or later with [amdgpu-install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html) with `--usecase=rocm` * Use either [Package install](#package-install) or [Source install](#source-install) as described below. diff --git a/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile b/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile index 1e8f2d86cf..16256f7ba1 100644 --- a/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile +++ b/projects/rocdecode/docker/rocDecode-on-ubuntu20.dockerfile @@ -9,7 +9,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install gcc g++ cmake pkg-config g RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-dev wget keyboard-configuration && \ wget https://repo.radeon.com/amdgpu-install/6.1/ubuntu/focal/amdgpu-install_6.1.60100-1_all.deb && \ sudo apt-get install -y ./amdgpu-install_6.1.60100-1_all.deb && \ - sudo amdgpu-install -y --usecase=multimediasdk,rocm --no-32 + sudo amdgpu-install -y --usecase=rocm WORKDIR /workspace diff --git a/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile b/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile index 5eb98b612e..0634f913d7 100644 --- a/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile +++ b/projects/rocdecode/docker/rocDecode-on-ubuntu22.dockerfile @@ -9,7 +9,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install gcc g++ cmake pkg-config g RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-dev wget keyboard-configuration && \ wget https://repo.radeon.com/amdgpu-install/6.1/ubuntu/jammy/amdgpu-install_6.1.60100-1_all.deb && \ sudo apt-get install -y ./amdgpu-install_6.1.60100-1_all.deb && \ - sudo amdgpu-install -y --usecase=multimediasdk,rocm --no-32 + sudo amdgpu-install -y --usecase=rocm WORKDIR /workspace diff --git a/projects/rocdecode/docs/install/install.rst b/projects/rocdecode/docs/install/install.rst index 3066e027b2..7f4fa9aace 100644 --- a/projects/rocdecode/docs/install/install.rst +++ b/projects/rocdecode/docs/install/install.rst @@ -47,9 +47,27 @@ Prerequisites * Install ROCm 6.1.0 or later with `amdgpu-install `_ - * Run: ``--usecase=multimediasdk,rocm --no-32`` + * Run: ``--usecase=rocm`` * To install rocDecode with minimum requirements, follow the :doc:`quick-start instructions <./quick-start>` +* AMD Libdrm + + .. code:: shell + + sudo apt install libdrm-amdgpu-dev + +* AMD Libva + + .. code:: shell + + sudo apt install libva-amdgpu-dev + +* AMD VA Drivers + + .. code:: shell + + sudo apt install mesa-amdgpu-va-drivers + * CMake 3.5 or later .. code:: shell diff --git a/projects/rocdecode/rocDecode-setup.py b/projects/rocdecode/rocDecode-setup.py index 9090d7a10c..209aaa0aee 100644 --- a/projects/rocdecode/rocDecode-setup.py +++ b/projects/rocdecode/rocDecode-setup.py @@ -124,14 +124,14 @@ os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' + if "Ubuntu" in platfromInfo: os.system('sudo -v') os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' '+linuxSystemInstall_check + - ' install vainfo libdrm-amdgpu-dev mesa-amdgpu-multimedia-devel') + ' install vainfo libdrm-amdgpu-dev libva-amdgpu-dev mesa-amdgpu-va-drivers') if "22.04" in platform.version(): os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' '+linuxSystemInstall_check + ' install libstdc++-12-dev') else: os.system('sudo -v') os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' '+linuxSystemInstall_check + - ' install libdrm-amdgpu-devel mesa-amdgpu-multimedia-devel') + ' install libdrm-amdgpu-devel libva-amdgpu-devel mesa-amdgpu-dri-drivers') # rocDecode Dev Requirements if developerInstall == 'ON':