From 81bc19a0e863d8b8ad65aabddacfb1de5e5c32a4 Mon Sep 17 00:00:00 2001 From: Thom Shutt Date: Fri, 29 Mar 2024 18:16:36 +0000 Subject: [PATCH 1/5] Revert "Bump ffmpeg version and nv-codec-headers (#2973)" This reverts commit cad6713174fc351850ae5a2f82b0f6ab306fc133. --- install_ffmpeg.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install_ffmpeg.sh b/install_ffmpeg.sh index 03b4e0b301..af66bd0b88 100755 --- a/install_ffmpeg.sh +++ b/install_ffmpeg.sh @@ -116,7 +116,7 @@ if [[ "$GOOS" != "darwin" ]]; then if [[ ! -e "$ROOT/nv-codec-headers" ]]; then git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git "$ROOT/nv-codec-headers" cd $ROOT/nv-codec-headers - git checkout n12.1.14.0 + git checkout n9.1.23.1 make -e PREFIX="$ROOT/compiled" make install -e PREFIX="$ROOT/compiled" fi @@ -203,8 +203,9 @@ else fi if [[ ! -e "$ROOT/ffmpeg/libavcodec/libavcodec.a" ]]; then - git clone https://github.com/livepeer/FFmpeg-6.1.1.git "$ROOT/ffmpeg" || echo "FFmpeg dir already exists" + git clone https://github.com/livepeer/FFmpeg.git "$ROOT/ffmpeg" || echo "FFmpeg dir already exists" cd "$ROOT/ffmpeg" + git checkout 2e18d069668c143f3c251067abd25389e411d022 ./configure ${TARGET_OS:-} $DISABLE_FFMPEG_COMPONENTS --fatal-warnings \ --enable-libx264 --enable-gpl \ --enable-protocol=rtmp,file,pipe \ From ebbf2102b8f6420a02439554fbe4992ab1113749 Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Mon, 1 Apr 2024 20:43:00 +0200 Subject: [PATCH 2/5] Revert "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)" This reverts commit 6c09a9f00682d7ed404257bba9f485dc0c4041ad. --- .github/workflows/build.yaml | 4 ++-- .github/workflows/docker.yaml | 4 ++-- docker/Dockerfile | 6 +++--- docker/Dockerfile.cuda-base | 10 +++++++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cb2d590e43..9950fdc0fa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,13 +39,13 @@ jobs: - GOOS: linux GOARCH: amd64 runner: ubuntu-20.04 - container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 + container: livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 type: gpu - GOOS: linux GOARCH: arm64 runner: ubuntu-20.04 - container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 + container: livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 type: gpu - GOOS: windows diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6661c9dc03..d83a5c2497 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -19,7 +19,7 @@ jobs: permissions: packages: write contents: read - runs-on: oxford + runs-on: ubuntu-20.04 steps: - name: Check out code uses: actions/checkout@v4.1.1 @@ -34,7 +34,7 @@ jobs: sudo apt purge -yqq dotnet-* mono-* llvm-* libllvm* powershell* openjdk-* \ temurin-* mongodb-* firefox mysql-* \ hhvm google-chrome-stable \ - libgl1-mesa-dri microsoft-edge-stable azure-cli || true + libgl1-mesa-dri microsoft-edge-stable azure-cli sudo apt autoremove -y sudo rm -rf /usr/share/dotnet /usr/local/lib/android diff --git a/docker/Dockerfile b/docker/Dockerfile index 5e12c11c91..8749ae2bc1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 as build +FROM --platform=$BUILDPLATFORM livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 as build ARG TARGETARCH ARG BUILDARCH @@ -55,9 +55,9 @@ COPY . . RUN make livepeer livepeer_cli livepeer_bench livepeer_router -FROM --platform=$TARGETPLATFORM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04 AS livepeer-amd64-base +FROM --platform=$TARGETPLATFORM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04 AS livepeer-amd64-base -FROM --platform=$TARGETPLATFORM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04 AS livepeer-arm64-base +FROM --platform=$TARGETPLATFORM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04 AS livepeer-arm64-base FROM livepeer-${TARGETARCH}-base diff --git a/docker/Dockerfile.cuda-base b/docker/Dockerfile.cuda-base index 4eab9e3673..b98f1a36b7 100644 --- a/docker/Dockerfile.cuda-base +++ b/docker/Dockerfile.cuda-base @@ -1,11 +1,15 @@ -# livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 +# livepeer/cuda-base:11.7.1-cudnn8-devel-ubuntu20.04 # -# Base CUDA Develop image which contains CUDA SDK libs for the following architectures: linux amd64, linux arm64 +# Base CUDA Develop image which contains CUDA SDK libs for the following architectures: linux amd64, linux arm64, windows amd64 # # To build this image you need the following steps: # 1. Download NVIDIA CUDA SDK for ARM64, extract, and copy into cuda/arm64/usr/local/cuda/ +# 2. Download NVIDIA CUDA SDK for Windows AMD64, extract, and copy npp libs into npp_win/ -FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu20.04 +FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04 + +COPY npp_win/lib/x64/* /usr/local/cuda/lib64/ +COPY npp_win/include/* /usr/local/cuda/include/ RUN mkdir -p /usr/local/cuda_arm64/lib64/ COPY cuda/arm64/usr/local/cuda/lib64/libnp* /usr/local/cuda_arm64/lib64/ From a612f4cb533aa325c6bd4a60cd659f3711c66feb Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Mon, 1 Apr 2024 21:05:05 +0200 Subject: [PATCH 3/5] Reapply "Update CUDA build version from 11.7.1 to 12.0.0 (#2978)" This reverts commit ebbf2102b8f6420a02439554fbe4992ab1113749. --- .github/workflows/build.yaml | 4 ++-- .github/workflows/docker.yaml | 4 ++-- docker/Dockerfile | 6 +++--- docker/Dockerfile.cuda-base | 10 +++------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9950fdc0fa..cb2d590e43 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,13 +39,13 @@ jobs: - GOOS: linux GOARCH: amd64 runner: ubuntu-20.04 - container: livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 + container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 type: gpu - GOOS: linux GOARCH: arm64 runner: ubuntu-20.04 - container: livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 + container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 type: gpu - GOOS: windows diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index d83a5c2497..6661c9dc03 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -19,7 +19,7 @@ jobs: permissions: packages: write contents: read - runs-on: ubuntu-20.04 + runs-on: oxford steps: - name: Check out code uses: actions/checkout@v4.1.1 @@ -34,7 +34,7 @@ jobs: sudo apt purge -yqq dotnet-* mono-* llvm-* libllvm* powershell* openjdk-* \ temurin-* mongodb-* firefox mysql-* \ hhvm google-chrome-stable \ - libgl1-mesa-dri microsoft-edge-stable azure-cli + libgl1-mesa-dri microsoft-edge-stable azure-cli || true sudo apt autoremove -y sudo rm -rf /usr/share/dotnet /usr/local/lib/android diff --git a/docker/Dockerfile b/docker/Dockerfile index 8749ae2bc1..5e12c11c91 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM livepeerci/cuda:11.7.1-cudnn8-devel-ubuntu20.04 as build +FROM --platform=$BUILDPLATFORM livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 as build ARG TARGETARCH ARG BUILDARCH @@ -55,9 +55,9 @@ COPY . . RUN make livepeer livepeer_cli livepeer_bench livepeer_router -FROM --platform=$TARGETPLATFORM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04 AS livepeer-amd64-base +FROM --platform=$TARGETPLATFORM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04 AS livepeer-amd64-base -FROM --platform=$TARGETPLATFORM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04 AS livepeer-arm64-base +FROM --platform=$TARGETPLATFORM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04 AS livepeer-arm64-base FROM livepeer-${TARGETARCH}-base diff --git a/docker/Dockerfile.cuda-base b/docker/Dockerfile.cuda-base index b98f1a36b7..4eab9e3673 100644 --- a/docker/Dockerfile.cuda-base +++ b/docker/Dockerfile.cuda-base @@ -1,15 +1,11 @@ -# livepeer/cuda-base:11.7.1-cudnn8-devel-ubuntu20.04 +# livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04 # -# Base CUDA Develop image which contains CUDA SDK libs for the following architectures: linux amd64, linux arm64, windows amd64 +# Base CUDA Develop image which contains CUDA SDK libs for the following architectures: linux amd64, linux arm64 # # To build this image you need the following steps: # 1. Download NVIDIA CUDA SDK for ARM64, extract, and copy into cuda/arm64/usr/local/cuda/ -# 2. Download NVIDIA CUDA SDK for Windows AMD64, extract, and copy npp libs into npp_win/ -FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04 - -COPY npp_win/lib/x64/* /usr/local/cuda/lib64/ -COPY npp_win/include/* /usr/local/cuda/include/ +FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu20.04 RUN mkdir -p /usr/local/cuda_arm64/lib64/ COPY cuda/arm64/usr/local/cuda/lib64/libnp* /usr/local/cuda_arm64/lib64/ From 5adb9a598b14b3d12f038201d7d8374fac5e2f8c Mon Sep 17 00:00:00 2001 From: Thom Shutt Date: Tue, 2 Apr 2024 10:12:01 +0100 Subject: [PATCH 4/5] Force ffmpeg reinstall --- .github/workflows/build.yaml | 4 ++-- .github/workflows/test.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cb2d590e43..a9685312fe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -83,7 +83,7 @@ jobs: uses: actions/cache@v3 with: path: /home/runner/compiled - key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-${{ matrix.target.type }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }} + key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-${{ matrix.target.type }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }}-2 - name: Set build environment run: | @@ -191,7 +191,7 @@ jobs: uses: actions/cache@v3 with: path: ~/compiled - key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }} + key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }}-2 - name: Install dependencies run: brew install coreutils pkg-config diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 58897cd341..5ec1a33a5c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,9 +52,9 @@ jobs: uses: actions/cache@v3 with: path: /home/runner/compiled - key: ${{ runner.os }}-ffmpeg-${{ hashFiles('install_ffmpeg.sh') }} + key: ${{ runner.os }}-ffmpeg-${{ hashFiles('install_ffmpeg.sh') }}-2 restore-keys: | - ${{ runner.os }}-ffmpeg + ${{ runner.os }}-ffmpeg-2 - name: Install protobuf run: | From ba07f69f2120cd254bfe7da4ab37e2d9ec984aba Mon Sep 17 00:00:00 2001 From: Thom Shutt Date: Tue, 2 Apr 2024 11:10:57 +0100 Subject: [PATCH 5/5] Revert "Force ffmpeg reinstall" This reverts commit 5adb9a598b14b3d12f038201d7d8374fac5e2f8c. --- .github/workflows/build.yaml | 4 ++-- .github/workflows/test.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a9685312fe..cb2d590e43 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -83,7 +83,7 @@ jobs: uses: actions/cache@v3 with: path: /home/runner/compiled - key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-${{ matrix.target.type }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }}-2 + key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-${{ matrix.target.type }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }} - name: Set build environment run: | @@ -191,7 +191,7 @@ jobs: uses: actions/cache@v3 with: path: ~/compiled - key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }}-2 + key: ${{ runner.os }}-${{ matrix.target.GOOS }}-${{ matrix.target.GOARCH }}-ffmpeg-${{ hashFiles('**/install_ffmpeg.sh') }} - name: Install dependencies run: brew install coreutils pkg-config diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5ec1a33a5c..58897cd341 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,9 +52,9 @@ jobs: uses: actions/cache@v3 with: path: /home/runner/compiled - key: ${{ runner.os }}-ffmpeg-${{ hashFiles('install_ffmpeg.sh') }}-2 + key: ${{ runner.os }}-ffmpeg-${{ hashFiles('install_ffmpeg.sh') }} restore-keys: | - ${{ runner.os }}-ffmpeg-2 + ${{ runner.os }}-ffmpeg - name: Install protobuf run: |