Skip to content

Commit a6a97db

Browse files
committed
release_v0.6.0 code drop
Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
1 parent 628f842 commit a6a97db

238 files changed

Lines changed: 9522 additions & 2666 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
*.jp2 filter=lfs diff=lfs merge=lfs -text
88
*.j2k filter=lfs diff=lfs merge=lfs -text
99
*.bmp filter=lfs diff=lfs merge=lfs -text
10+
*.svs filter=lfs diff=lfs merge=lfs -text
11+
*.pptx filter=lfs diff=lfs merge=lfs -text
12+
1013
*.ppm -text
1114
*.pbm -text
1215
*.pgm -text
13-
*.jxr filter=lfs diff=lfs merge=lfs -text

.github/ISSUE_TEMPLATE/bug_report_form.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ body:
2828
attributes:
2929
label: Version
3030
description: What version of nvImageCodec are you running?
31-
placeholder: "example: 0.5.0"
31+
placeholder: "example: 0.6.0"
3232
validations:
3333
required: true
3434

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ bin/*
1010
.*.swp
1111
.dockerignore
1212
nvimgcodec_version.h
13-
*__pycache__*
13+
*__pycache__*
14+
.venv/

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
1818
include(CMakeDependentOption)
1919

2020
set(NVIMGCODEC_PROJECT_NAME "nvimgcodec")
21-
set(NVIMGCODEC_VERSION "0.5.0")
21+
set(NVIMGCODEC_VERSION "0.6.0")
2222

2323
if (NVIMGCODEC_FLAVOR)
2424
set(NVIMGCODEC_FLAVOR "${NVIMGCODEC_FLAVOR}") # could be nightly, weekly, etc if necessary
@@ -276,7 +276,7 @@ CUDA_find_supported_arch_values(CUDA_supported_archs ${USED_CUDA_COMPILER} ${CUD
276276
message(STATUS "CUDA supported archs: ${CUDA_supported_archs}")
277277

278278
set(CUDA_TARGET_ARCHS_SORTED ${CUDA_TARGET_ARCHS})
279-
list(SORT CUDA_TARGET_ARCHS_SORTED)
279+
list(SORT CUDA_TARGET_ARCHS_SORTED COMPARE NATURAL)
280280
CUDA_find_supported_arch_values(CUDA_targeted_archs ${USED_CUDA_COMPILER} ${CUDA_TARGET_ARCHS_SORTED})
281281
message(STATUS "CUDA targeted archs: ${CUDA_targeted_archs}")
282282
if (NOT CUDA_targeted_archs)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# nvImageCodec
22

3-
![Version](https://img.shields.io/badge/Version-v0.5.0--beta-blue)
3+
![Version](https://img.shields.io/badge/Version-v0.6.0--beta-blue)
44
[![License](https://img.shields.io/badge/License-Apache_2.0-yellogreen.svg)](https://opensource.org/licenses/Apache-2.0)
55

66
![Platform](https://img.shields.io/badge/Platform-linux--x86__64_%7C_linux--aarch64_%7C_windows--64_wsl2_%7C_windows--64-blue)
@@ -259,17 +259,17 @@ This will generate in build directory *.zip or *tar.xz files
259259
#### Tar file installation
260260

261261
```
262-
tar -xvf nvimgcodec-0.5.0.0-cuda12-x86_64-linux-lib.tar.gz -C /opt/nvidia/
262+
tar -xvf nvimgcodec-0.6.0.0-cuda12-x86_64-linux-lib.tar.gz -C /opt/nvidia/
263263
```
264264

265265
#### DEB File Installation
266266
```
267-
sudo apt-get install -y ./nvimgcodec-0.5.0.0-cuda12-x86_64-linux-lib.deb
267+
sudo apt-get install -y ./nvimgcodec-0.6.0.0-cuda12-x86_64-linux-lib.deb
268268
```
269269
#### Python WHL File Installation
270270

271271
```
272-
pip install nvidia_nvimgcodec_cu12-0.5.0-py3-none-manylinux2014_x86_64.whl
272+
pip install nvidia_nvimgcodec_cu12-0.6.0-py3-none-manylinux2014_x86_64.whl
273273
```
274274

275275
### Installation from sources
@@ -329,7 +329,7 @@ Run Python API tests
329329
First install python wheel. You would also need to have installed all Python tests dependencies (see Dockerfiles).
330330

331331
```
332-
pip install nvidia_nvimgcodec_cu12-0.5.0.x-py3-none-manylinux2014_x86_64.whl
332+
pip install nvidia_nvimgcodec_cu12-0.6.0.x-py3-none-manylinux2014_x86_64.whl
333333
```
334334

335335
Run tests

cmake/CUDA_utils.cmake

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,26 @@ endfunction()
4141
# List of currently used arch values
4242
if (${ARCH} MATCHES "aarch64-")
4343
# aarch64-linux and aarch64-qnx
44-
set(CUDA_known_archs "53" "62" "72" "75" "87")
44+
# used for tegra boards
45+
set(CUDA_known_archs "53" "62" "72" "87" "90a" "110")
4546
elseif (${ARCH} MATCHES "aarch64")
4647
# aarch64 SBSA, only >=Volta
4748
# from the whole list/; "70" "75" "80" "86"
4849
# we pick only major arch as minor should be compatible without JITing, it should
4950
# shrink the output binary
50-
set(CUDA_known_archs "70" "80" "90")
51+
set(CUDA_known_archs "70" "80" "90" "100" "110" "120")
5152
else()
5253
# from the whole list: "35" "50" "52" "60" "61" "70" "75" "80" "86"
5354
# we pick only major arch as minor should be compatible without JITing, it should
5455
# shrink the output binary
55-
set(CUDA_known_archs "35" "50" "60" "70" "80" "90")
56+
set(CUDA_known_archs "35" "50" "60" "70" "80" "90" "100" "110" "120")
57+
endif()
58+
59+
if ("${CUDA_VERSION_MAJOR}" EQUAL "13")
60+
# We need sm75 to Turing, which is still supported with cuda 13
61+
# but major version (sm70) is Volta, which is not supported with cuda 13."
62+
list(APPEND CUDA_known_archs "75")
63+
list(SORT CUDA_known_archs COMPARE NATURAL)
5664
endif()
5765

5866
set(CUDA_TARGET_ARCHS ${CUDA_known_archs} CACHE STRING "List of target CUDA architectures")

cmake/Dependencies.cmake

Lines changed: 55 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
44
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
@@ -33,6 +33,11 @@ endfunction()
3333

3434
find_package(CUDAToolkit REQUIRED)
3535

36+
set(CTK_SEARCH_PATHS
37+
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
38+
${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/include
39+
)
40+
3641
include_directories(SYSTEM ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
3742
find_path(NVJPEG_INCLUDE
3843
NAMES nvjpeg.h
@@ -45,97 +50,90 @@ include_directories(SYSTEM ${NVJPEG_INCLUDE})
4550
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/external/NVTX/c/include)
4651
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/external/dlpack/include)
4752

48-
# Linking with static nvjpeg2k until there is a python package for it
4953
if (BUILD_NVJPEG2K_EXT)
50-
if (NOT WITH_DYNAMIC_NVJPEG2K)
51-
CUDA_find_library(NVJPEG2K_LIBRARY nvjpeg2k_static)
52-
if (${NVJPEG2K_LIBRARY} STREQUAL "NVJPEG2K_LIBRARY-NOTFOUND")
53-
message(WARNING "nvjpeg2k not found - disabled")
54-
set(BUILD_NVJPEG2K_EXT OFF CACHE BOOL INTERNAL)
55-
set(BUILD_NVJPEG2K_EXT OFF)
56-
else()
57-
message(STATUS "Found nvjpeg2k: " ${NVJPEG2K_LIBRARY})
58-
endif()
59-
else()
60-
# Note: We are getting the x86_64 tarball, but we are only interested in the headers.
54+
if (WITH_DYNAMIC_NVJPEG2K)
6155
include(FetchContent)
6256
FetchContent_Declare(
6357
nvjpeg2k_headers
64-
URL https://developer.download.nvidia.com/compute/nvjpeg2000/redist/libnvjpeg_2k/linux-x86_64/libnvjpeg_2k-linux-x86_64-0.8.0.38-archive.tar.xz
65-
URL_HASH SHA512=21acc1bfa7b6967fc2240dac9c9041faa6c10c9fe356f754748b6a6154e92031b0e4d8d1a0a1d1cdfb5c68b929126d548e7ea3d321609d339c2a6668281d2180
58+
URL https://developer.download.nvidia.com/compute/nvjpeg2000/redist/libnvjpeg_2k/linux-x86_64/libnvjpeg_2k-linux-x86_64-0.9.0.43-archive.tar.xz
59+
URL_HASH SHA512=22d14a20af67ba414956fd7c4223cf3fd519cec9ccbd0ae27603416ab143eae92457ab0434205fe66617bcc5a54805bfc6183f89205ea2d0068d497321a43783
6660
)
6761
FetchContent_Populate(nvjpeg2k_headers)
68-
set(nvjpeg2k_SEARCH_PATH "${nvjpeg2k_headers_SOURCE_DIR}/include")
62+
set(NVJPEG2K_SEARCH_PATHS "${nvjpeg2k_headers_SOURCE_DIR}/include")
63+
else()
64+
set(NVJPEG2K_SEARCH_PATHS ${CTK_SEARCH_PATHS})
65+
find_library(NVJPEG2K_LIBRARY nvjpeg2k_static PATH_SUFFIXES lib lib64)
66+
if(NVJPEG2K_LIBRARY)
67+
message(STATUS "Found nvJPEG2k: ${NVJPEG2K_LIBRARY}")
68+
else()
69+
message(WARNING "nvJPEG2k library not found. Disabling nvJPEG2k and tests build.")
70+
set(BUILD_NVJPEG2K_EXT OFF CACHE BOOL INTERNAL)
71+
set(BUILD_NVJPEG2K_EXT OFF)
72+
endif()
6973
endif()
7074

71-
if(NOT DEFINED NVJPEG2K_INCLUDE)
72-
find_path(NVJPEG2K_INCLUDE
73-
NAMES nvjpeg2k.h
74-
PATHS ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
75-
${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/include
76-
${nvjpeg2k_SEARCH_PATH}
77-
)
75+
find_path(NVJPEG2K_INCLUDE NAMES nvjpeg2k.h HINTS ${NVJPEG2K_SEARCH_PATHS})
76+
77+
if((NVJPEG2K_LIBRARY OR WITH_DYNAMIC_NVJPEG2K) AND NOT NVJPEG2K_INCLUDE)
78+
message(FATAL_ERROR
79+
"nvJPEG2k header file not found, please check your install"
80+
" or disable nvJPEG2k extension build with -DBUILD_NVJPEG2K_EXT=OFF")
7881
endif()
7982
endif()
8083

8184
if (BUILD_NVJPEG2K_EXT)
82-
message(STATUS "NVJPEG2K_INCLUDE=${NVJPEG2K_INCLUDE}")
83-
include_directories(SYSTEM ${NVJPEG2K_INCLUDE})
85+
message(STATUS "Using NVJPEG2K_INCLUDE=${NVJPEG2K_INCLUDE}")
86+
include_directories(BEFORE SYSTEM ${NVJPEG2K_INCLUDE})
8487
else()
85-
message(STATUS "nvjpeg2k extension build disabled")
88+
message(STATUS "nvJPEG2k extension build disabled")
8689
endif()
8790

8891
if (BUILD_NVTIFF_EXT)
8992
if (WITH_DYNAMIC_NVTIFF)
90-
message(STATUS "Dynamic nvTIFF extension build")
91-
# Note: We are getting the x86_64 tarball, but we are only interested in the headers.
9293
include(FetchContent)
9394
FetchContent_Declare(
9495
nvtiff_headers
95-
URL https://developer.download.nvidia.com/compute/nvtiff/redist/libnvtiff/linux-x86_64/libnvtiff-linux-x86_64-0.5.0.67_cuda12-archive.tar.xz
96-
URL_HASH SHA512=62dea5c9b72aa3f4e18b306e3f1e60a00082e67c6cedc95442413b39aa48e41ae4b9371a5ff210a37a6cb3008ed308aeb78cbf2a7b9df55bc5ee7a6da0899832
96+
URL https://developer.download.nvidia.com/compute/nvtiff/redist/libnvtiff/linux-x86_64/libnvtiff-linux-x86_64-0.5.1.75_cuda12-archive.tar.xz
97+
URL_HASH SHA512=66332d1cb32d428b8f7fce8ebaf9d44caa01d85f77d880c827ccf15459f3164e6dcfabfb88e4a0c2b0916ef83161c2d9f8990bebb8d61aca938cd9199b514752
9798
)
9899
FetchContent_Populate(nvtiff_headers)
99-
set(nvtiff_SEARCH_PATH "${nvtiff_headers_SOURCE_DIR}/include")
100-
101-
find_path(NVTIFF_INCLUDE
102-
NAMES nvtiff.h
103-
PATHS ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
104-
${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/include
105-
${nvtiff_SEARCH_PATH}
106-
)
100+
set(NVTIFF_SEARCH_PATHS "${nvtiff_headers_SOURCE_DIR}/include")
107101
else()
102+
set(NVTIFF_SEARCH_PATHS ${CTK_SEARCH_PATHS})
108103
find_library(NVTIFF_LIB nvtiff_static PATH_SUFFIXES lib lib64)
109-
if(NOT NVTIFF_LIB)
110-
message(WARNING, "nvTIFF library not found. Disabling its extensions and tests build.")
104+
if(NVTIFF_LIB)
105+
message(STATUS "Found nvTIFF: ${NVTIFF_LIB}")
106+
else()
107+
message(WARNING "nvTIFF library not found. Disabling nvTIFF extension and tests build.")
111108
set(BUILD_NVTIFF_EXT OFF CACHE BOOL INTERNAL)
112109
set(BUILD_NVTIFF_EXT OFF)
113-
else()
114-
message(STATUS "Found nvTIFF: ${NVTIFF_LIB}")
115-
find_path(NVTIFF_INCLUDE NAMES nvtiff.h)
116-
if(NOT NVTIFF_INCLUDE)
117-
message(FATAL_ERROR,
118-
" Found nvTIFF library file but not header file, please check your install"
119-
" or disable nvTIFF extension build with -DBUILD_NVTIFF_EXT=OFF")
120-
endif()
121110
endif()
122111
endif()
112+
113+
find_path(NVTIFF_INCLUDE NAMES nvtiff.h HINTS ${NVTIFF_SEARCH_PATHS})
114+
115+
if((NVTIFF_LIB OR WITH_DYNAMIC_NVTIFF) AND NOT NVTIFF_INCLUDE)
116+
message(FATAL_ERROR
117+
"nvTIFF header file not found, please check your install"
118+
" or disable nvTIFF extension build with -DBUILD_NVTIFF_EXT=OFF")
119+
endif()
123120
endif()
121+
124122
if (BUILD_NVTIFF_EXT)
125123
message(STATUS "Using NVTIFF_INCLUDE=${NVTIFF_INCLUDE}")
126-
include_directories(SYSTEM ${NVTIFF_INCLUDE})
124+
include_directories(BEFORE SYSTEM ${NVTIFF_INCLUDE})
127125
else()
128-
message(STATUS "nvtiff extension build disabled")
126+
message(STATUS "nvTIFF extension build disabled")
129127
endif()
130128

131129
set(TIFF_LIBRARY_DEPS)
132130

133131
find_package(ZLIB)
134-
if(NOT DEFINED ZLIB_LIBRARY)
132+
if(NOT ZLIB_FOUND)
135133
message(STATUS "zlib not found - disabled")
136134
else()
137-
message(STATUS "Using zlib at ${ZLIB_LIBRARY}")
138-
list(APPEND TIFF_LIBRARY_DEPS ${ZLIB_LIBRARY})
135+
message(STATUS "Using zlib at ${ZLIB_LIBRARIES}")
136+
list(APPEND TIFF_LIBRARY_DEPS ${ZLIB_LIBRARIES})
139137
endif()
140138

141139
find_package(ZSTD)
@@ -147,14 +145,14 @@ else()
147145
endif()
148146

149147
find_package(JPEG 62) # 1.5.3 version
150-
if(NOT DEFINED JPEG_LIBRARY)
148+
if(NOT JPEG_FOUND)
151149
message(STATUS "libjpeg-turbo not found - disabled")
152150
set(BUILD_LIBJPEG_TURBO_EXT OFF CACHE BOOL INTERNAL)
153151
set(BUILD_LIBJPEG_TURBO_EXT OFF)
154152
else()
155-
message(STATUS "Using libjpeg-turbo at ${JPEG_LIBRARY}")
156-
include_directories(SYSTEM ${JPEG_INCLUDE_DIR})
157-
list(APPEND TIFF_LIBRARY_DEPS ${JPEG_LIBRARY})
153+
message(STATUS "Using libjpeg-turbo at ${JPEG_LIBRARIES}")
154+
include_directories(SYSTEM ${JPEG_INCLUDE_DIRS})
155+
list(APPEND TIFF_LIBRARY_DEPS ${JPEG_LIBRARIES})
158156
endif()
159157

160158
find_package(TIFF)

docker/Dockerfile.aarch64

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,31 @@ RUN apt-get update && apt-get install software-properties-common -y --no-install
4444
&& rm -rf /var/lib/apt/lists/*
4545

4646
RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
47-
NVJPEG2K_VERSION=0.8.0.38-1 && \
48-
apt-get update && \
49-
apt-get install wget software-properties-common -y && \
50-
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/3bf863cc.pub && \
51-
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/7fa2af80.pub && \
52-
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/sbsa/ /" && \
53-
apt-get update && \
54-
apt-get install libnvjpeg2k0-dev-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
55-
libnvjpeg2k0-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} \
56-
libnvjpeg2k0-static-cuda-${CUDA_VERSION_MAJOR}=${NVJPEG2K_VERSION} -y && \
57-
cp /usr/include/libnvjpeg2k/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/include/ && \
58-
cp -d /usr/lib/sbsa-linux-gnu/libnvjpeg2k/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/lib64/ && \
59-
rm -rf /var/lib/apt/lists/*
47+
NVJPEG2K_VERSION=0.9.0.43 && \
48+
wget https://developer.download.nvidia.com/compute/nvjpeg2000/redist/libnvjpeg_2k/linux-sbsa/libnvjpeg_2k-linux-sbsa-${NVJPEG2K_VERSION}-archive.tar.xz && \
49+
tar -xf libnvjpeg_2k-linux-sbsa-${NVJPEG2K_VERSION}-archive.tar.xz && \
50+
cp -d libnvjpeg_2k-linux-sbsa-${NVJPEG2K_VERSION}-archive/lib/${CUDA_VERSION_MAJOR}/* /usr/local/cuda/lib64/ && \
51+
rm -r libnvjpeg_2k-linux-sbsa-${NVJPEG2K_VERSION}-archive libnvjpeg_2k-linux-sbsa-${NVJPEG2K_VERSION}-archive.tar.xz
6052

6153
RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
62-
NVTIFF_VERSION=0.5.0.67 && \
54+
test "$CUDA_VERSION_MAJOR" -gt 12 && CUDA_VERSION_MAJOR=12 || true && \
55+
NVTIFF_VERSION=0.5.1.75 && \
6356
wget https://developer.download.nvidia.com/compute/nvtiff/redist/libnvtiff/linux-sbsa/libnvtiff-linux-sbsa-${NVTIFF_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive.tar.xz && \
6457
tar -xf libnvtiff-linux-sbsa-${NVTIFF_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive.tar.xz && \
6558
cp -d libnvtiff-linux-sbsa-${NVTIFF_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive/lib/* /usr/local/cuda/lib64/ && \
6659
rm -r libnvtiff-linux-sbsa-${NVTIFF_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive libnvtiff-linux-sbsa-${NVTIFF_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive.tar.xz
6760

6861
RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
69-
NVCOMP_VERSION=4.0.1 && \
62+
test "$CUDA_VERSION_MAJOR" -gt 12 && CUDA_VERSION_MAJOR=12 || true && \
63+
NVCOMP_VERSION=5.0.0.6 && \
7064
echo "Installing nvcomp for cuda ${CUDA_VERSION_MAJOR}" && \
71-
wget https://developer.download.nvidia.com/compute/nvcomp/${NVCOMP_VERSION}/local_installers/nvcomp-linux-sbsa-${NVCOMP_VERSION}-cuda${CUDA_VERSION_MAJOR}.x.tar.gz && \
72-
tar -xf nvcomp-linux-sbsa-${NVCOMP_VERSION}-cuda${CUDA_VERSION_MAJOR}.x.tar.gz && \
73-
cp -d nvcomp/lib/libnvcomp.so* /usr/local/cuda/lib64/ && \
74-
rm -r nvcomp nvcomp-linux-sbsa-${NVCOMP_VERSION}-cuda${CUDA_VERSION_MAJOR}.x.tar.gz
65+
wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive.tar.xz && \
66+
tar -xf nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive.tar.xz && \
67+
cp -d nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive/lib/libnvcomp.so* /usr/local/cuda/lib64/ && \
68+
rm -r nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda${CUDA_VERSION_MAJOR}-archive.tar.xz
7569

76-
RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
77-
python3 -m pip install \
70+
RUN python3 -m pip install \
7871
pytest \
79-
cupy-cuda${CUDA_VERSION_MAJOR}x \
8072
opencv-python \
8173
sphinx \
8274
sphinx_rtd_theme \
@@ -95,22 +87,30 @@ RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
9587
nose2 && \
9688
rm -rf /root/.cache/pip
9789

90+
RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
91+
if [ "$CUDA_VERSION_MAJOR" = "13" ]; then \
92+
python3 -m pip install --pre cupy-cuda12X -f https://pip.cupy.dev/pre; \
93+
else \
94+
python3 -m pip install cupy-cuda${CUDA_VERSION_MAJOR}x==12.3; \
95+
fi
96+
9897
# DALI
9998
ENV DALI_PATH="/opt/dali"
10099
ENV DALI_EXTRA_PATH="/opt/dali_extra"
101100
RUN CUDA_VERSION_MAJOR=$(echo "$VER_CUDA" | sed -E 's/^([0-9]+)\..*/\1/') && \
101+
test "$CUDA_VERSION_MAJOR" -gt 12 && CUDA_VERSION_MAJOR=12 || true && \
102102
# Install DALI
103-
python3 -m pip install nvidia-dali-cuda${CUDA_VERSION_MAJOR}0>=1.46.0 && \
103+
python3 -m pip install --upgrade --force-reinstall pip && \
104+
python3 -m pip install nvidia-dali-cuda${CUDA_VERSION_MAJOR}0>=1.48.0 && \
104105
# Uninstall nvimagecodec pulled automatically
105-
python3 -m pip uninstall -y nvidia-nvimgcodec-cu${CUDA_VERSION_MAJOR} && \
106+
python3 -m pip uninstall -y nvidia-nvimgcodec-cu${CUDA_VERSION_MAJOR} nvidia-nvjpeg2k-cu${CUDA_VERSION_MAJOR} nvidia-nvtiff-cu${CUDA_VERSION_MAJOR} nvidia-nvcomp-cu${CUDA_VERSION_MAJOR} || true && \
106107
mkdir -p /opt && \
107108
# Get installed DALI version
108109
export DALI_VERSION=$(pip show nvidia-dali-cuda${CUDA_VERSION_MAJOR}0 | sed -n 's/^Version: \(.*\)$/\1/p') && \
109110
# Fetch sources for the currently installed DALI version
110111
git clone https://github.com/NVIDIA/DALI.git ${DALI_PATH} && \
111-
cd ${DALI_PATH}; git checkout tags/v${DALI_VERSION} || true; cd - && \
112+
cd ${DALI_PATH} && git checkout tags/v${DALI_VERSION} && cd - && \
112113
# Fetch DALI_extra for the current DALI sources
113114
git clone https://github.com/NVIDIA/DALI_extra.git ${DALI_EXTRA_PATH} && \
114-
cd ${DALI_EXTRA_PATH}; git checkout $(cat /opt/dali/DALI_EXTRA_VERSION) || true; cd -
115-
115+
cd ${DALI_EXTRA_PATH} && git checkout $(cat /opt/dali/DALI_EXTRA_VERSION) && cd -
116116
WORKDIR /workspace

0 commit comments

Comments
 (0)