Skip to content

Commit a85bdab

Browse files
committed
[actions] Create minimal distribution
Intended for DVR-Scan.
1 parent e7582c0 commit a85bdab

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
@@ -93,30 +93,6 @@ jobs:
9393
echo "CUDA_PATH=$CUDA_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
9494
Copy-Item -Path "$CUDA_PATH/bin/*" -Destination . -Include "*.dll"
9595
shell: pwsh
96-
- name: Cache CuDNN Installer
97-
id: cache-cudnn-installer
98-
uses: actions/cache@v3
99-
with:
100-
path: ./.cache/cudnn.zip
101-
key: cudnn-8.9.7.29-cuda-12-windows
102-
- name: 🔧 Install NVIDIA CuDNN
103-
run: |
104-
$cudnn_path = "./.cache/cudnn.zip"
105-
if (-not (Test-Path $cudnn_path)) {
106-
echo "Downloading CuDNN..."
107-
$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"
108-
New-Item -Path (Split-Path $cudnn_path) -ItemType Directory -Force
109-
curl -L -o $cudnn_path $cudnn_installer_url
110-
} else {
111-
echo "CuDNN installer found in cache."
112-
}
113-
echo "Installing CuDNN..."
114-
7z x $cudnn_path
115-
$CUDNN_PATH = "D:/a/opencv-python-cuda/opencv-python-cuda/cudnn-windows-x86_64-8.9.7.29_cuda12-archive"
116-
echo "CUDNN_LIBRARY=$CUDNN_PATH/lib/x64/cudnn.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
117-
echo "CUDNN_INCLUDE_DIR=$CUDNN_PATH/include" | Out-File -FilePath $env:GITHUB_ENV -Append
118-
Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
119-
shell: pwsh
12096

12197
# TODO: This isn't the correct cache key since it relies on the CMake options we build with.
12298
# This is good enough for now though to cache build artifacts; we can manually skip restoring
@@ -132,6 +108,7 @@ jobs:
132108
133109
- name: Build a package
134110
# CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
111+
# TODO: Check if adding --skip-cmake is necessary.
135112
run: |
136113
python --version
137114
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)