Skip to content

feat: support cupy gpu pointer (#514) #20

feat: support cupy gpu pointer (#514)

feat: support cupy gpu pointer (#514) #20

Workflow file for this run

name: build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
# Use bash also on Windows (instead of pwsh)
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v3
# already installed on runner: git build-essential python3-dev python3-pip cmake (new version required, use pip if toold)
- name: Install dependencies
if: ${{ matrix.os != 'windows-2022' }}
run: |
sudo apt-get update
sudo apt-get install \
libavfilter-dev \
libavformat-dev \
libavcodec-dev \
libswresample-dev \
libavutil-dev \
python3-testresources\
-y
python -mpip install -U setuptools wheel pip
- name: Install dependencies (Windows)
if: ${{ matrix.os == 'windows-2022' }}
run: |
curl -L https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-lgpl-shared.zip --output ffmpeg.zip
unzip ffmpeg.zip
mv ffmpeg*-shared ffmpeg
# CUDA toolkit: the following is sufficient on Ubuntu cuda-libraries-XX-X cuda-compiler-XX-X libnpp-dev-XX-X libnvidia-decode-XXX
- uses: Jimver/[email protected]
id: cuda-toolkit
if: ${{ matrix.os != 'windows-2022' }}
with:
cuda: '11.7.0'
sub-packages: '["nvcc", "nvtx", "cudart"]'
method: "network"
- uses: Jimver/[email protected]
id: cuda-toolkit-win
if: ${{ matrix.os == 'windows-2022' }}
with:
cuda: '11.7.0'
# https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#install-cuda-software
sub-packages: '["nvcc", "nvtx", "cudart", "npp_dev", "npp"]'
method: "network"
- name: Install CUVID
if: ${{ matrix.os != 'windows-2022' }}
run: |
# normally you would install them via `apt install cuda`
sudo apt-get install \
libnpp-dev-11-7 \
libnvidia-decode-520 \
-y
- name: Build and Install Package
run: |
SKBUILD_CONFIGURE_OPTIONS="-DTC_FFMPEG_ROOT=D:/a/VideoProcessingFramework/VideoProcessingFramework/ffmpeg/" python -mpip install . --verbose
- name: Check Import
# importing does not work on Windows as nvcuda.dll is required which comes with a Nvidia driver
if: ${{ matrix.os != 'windows-2022' }}
run: |
python -c "import PyNvCodec"