Skip to content

Commit 97a8ac7

Browse files
committed
[actions] Create minimal distribution
Intended for DVR-Scan.
1 parent 6ebcd60 commit 97a8ac7

2 files changed

Lines changed: 5 additions & 28 deletions

File tree

.github/workflows/build_wheels_windows.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,30 +92,6 @@ jobs:
9292
echo "CUDA_PATH=$CUDA_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
9393
Copy-Item -Path "$CUDA_PATH/bin/*" -Destination . -Include "*.dll"
9494
shell: pwsh
95-
- name: Cache CuDNN Installer
96-
id: cache-cudnn-installer
97-
uses: actions/cache@v3
98-
with:
99-
path: ./.cache/cudnn.zip
100-
key: cudnn-8.9.7.29-cuda-12-windows
101-
- name: 🔧 Install NVIDIA CuDNN
102-
run: |
103-
$cudnn_path = "./.cache/cudnn.zip"
104-
if (-not (Test-Path $cudnn_path)) {
105-
echo "Downloading CuDNN..."
106-
$cudnn_installer_url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip"
107-
New-Item -Path (Split-Path $cudnn_path) -ItemType Directory -Force
108-
curl -L -o $cudnn_path $cudnn_installer_url
109-
} else {
110-
echo "CuDNN installer found in cache."
111-
}
112-
echo "Installing CuDNN..."
113-
7z x $cudnn_path
114-
$CUDNN_PATH = "D:/a/opencv-python-cuda/opencv-python-cuda/cudnn-windows-x86_64-8.9.7.29_cuda12-archive"
115-
echo "CUDNN_LIBRARY=$CUDNN_PATH/lib/x64/cudnn.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
116-
echo "CUDNN_INCLUDE_DIR=$CUDNN_PATH/include" | Out-File -FilePath $env:GITHUB_ENV -Append
117-
Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
118-
shell: pwsh
11995

12096
# TODO: This isn't the correct cache key since it relies on the CMake options we build with.
12197
# This is good enough for now though to cache build artifacts; we can manually skip restoring
@@ -131,6 +107,7 @@ jobs:
131107
132108
- name: Build a package
133109
# CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
110+
# TODO: Check if adding --skip-cmake is necessary.
134111
run: |
135112
python --version
136113
python -m pip install --upgrade pip

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ def main():
185185
"-DWITH_NVCUVID=OFF",
186186
f"-DCUDA_ARCH_BIN={cuda_arch_bin}",
187187
f"-DCUDA_ARCH_PTX={cuda_arch_ptx}",
188-
"-DOPENCV_ENABLE_NONFREE=ON",
189-
f"-DCUDNN_LIBRARY={cudnn_library}",
190-
f"-DCUDNN_INCLUDE_DIR={cudnn_include_dir}",
191-
]
188+
"-DOPENCV_ENABLE_NONFREE=OFF",
189+
"-DWITH_CUDNN=OFF",
190+
"-DBUILD_LIST=bgsegm,cudabgsegm,cudacodec,cudafilters,cudev,imgcodecs,imgproc,python3,text,video,videoio"
191+
]
192192
+ (
193193
# CMake flags for windows/arm64 build
194194
["-DCMAKE_GENERATOR_PLATFORM=ARM64",

0 commit comments

Comments
 (0)