-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21459 from boegel/20240920214847_new_pr_dlib19246
{ai}[foss/2023a] face-recognition v1.3.0, dlib v19.24.6 w/ CUDA 12.1.1
- Loading branch information
Showing
3 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
easybuild/easyconfigs/d/dlib/dlib-19.24.6-foss-2023a-CUDA-12.1.1.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
easyblock = 'PythonPackage' | ||
|
||
name = 'dlib' | ||
version = '19.24.6' | ||
versionsuffix = '-CUDA-%(cudaver)s' | ||
|
||
homepage = 'https://github.com/davisking/dlib' | ||
description = """Dlib is a modern C++ toolkit containing machine learning | ||
algorithms and tools for creating complex software in C++ to solve real world | ||
problems. It is used in both industry and academia in a wide range of domains | ||
including robotics, embedded devices, mobile phones, and large high performance | ||
computing environments.""" | ||
|
||
# dlib can use BLAS/LAPACK, so using full toolchain | ||
toolchain = {'name': 'foss', 'version': '2023a'} | ||
toolchainopts = {'pic': True} | ||
|
||
sources = [SOURCE_TAR_GZ] | ||
patches = ['dlib-19.24.6_FlexiBLAS.patch'] | ||
checksums = [ | ||
{'dlib-19.24.6.tar.gz': '77e3c28ac2c66141514b07cbb74b7c7f80381c019ce5fec99007980bc6490d7d'}, | ||
{'dlib-19.24.6_FlexiBLAS.patch': '47fb348d5f1cd064a135d33cf49fdef56ade24a64218311743076cb6b313738b'}, | ||
] | ||
|
||
builddependencies = [ | ||
('CMake', '3.26.3'), | ||
('pkgconf', '1.9.5'), | ||
] | ||
dependencies = [ | ||
('CUDA', '12.1.1', '', SYSTEM), | ||
('cuDNN', '8.9.2.26', versionsuffix, SYSTEM), | ||
('Python', '3.11.3'), | ||
('libjxl', '0.8.2'), | ||
('X11', '20230603'), | ||
] | ||
|
||
download_dep_fail = True | ||
use_pip = True | ||
|
||
preinstallopts = "export CMAKE_BUILD_PARALLEL_LEVEL=%(parallel)s && " | ||
preinstallopts += "sed -i 's/BLAS_REFERENCE cblas/BLAS_REFERENCE flexiblas/g' dlib/cmake_utils/find_blas.cmake && " | ||
|
||
sanity_check_paths = { | ||
'files': [], | ||
'dirs': ['lib/python%(pyshortver)s/site-packages'], | ||
} | ||
|
||
sanity_pip_check = True | ||
|
||
moduleclass = 'lib' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use FlexiBLAS as BLAS/LAPACK library | ||
author: Kenneth Hoste (HPC-UGent) | ||
diff -ru dlib-19.24.6.orig/dlib/cmake_utils/find_blas.cmake dlib-19.24.6/dlib/cmake_utils/find_blas.cmake | ||
--- dlib-19.24.6.orig/dlib/cmake_utils/find_blas.cmake 2024-02-18 14:43:31.000000000 +0100 | ||
+++ dlib-19.24.6/dlib/cmake_utils/find_blas.cmake 2024-09-20 20:35:35.927348475 +0200 | ||
@@ -66,17 +66,15 @@ | ||
|
||
# First, search for libraries via pkg-config, which is the cleanest path | ||
find_package(PkgConfig) | ||
- pkg_check_modules(BLAS_REFERENCE cblas) | ||
- pkg_check_modules(LAPACK_REFERENCE lapack) | ||
+ pkg_check_modules(BLAS_REFERENCE flexiblas) | ||
# Make sure the cblas found by pkgconfig actually has cblas symbols. | ||
SET(CMAKE_REQUIRED_LIBRARIES "${BLAS_REFERENCE_LDFLAGS}") | ||
CHECK_FUNCTION_EXISTS(cblas_ddot PKGCFG_HAVE_CBLAS) | ||
if (BLAS_REFERENCE_FOUND AND LAPACK_REFERENCE_FOUND AND PKGCFG_HAVE_CBLAS) | ||
set(blas_libraries "${BLAS_REFERENCE_LDFLAGS}") | ||
- set(lapack_libraries "${LAPACK_REFERENCE_LDFLAGS}") | ||
set(blas_found 1) | ||
set(lapack_found 1) | ||
- set(REQUIRES_LIBS "${REQUIRES_LIBS} cblas lapack") | ||
+ set(REQUIRES_LIBS "${REQUIRES_LIBS} flexiblas") | ||
message(STATUS "Found BLAS and LAPACK via pkg-config") | ||
return() | ||
endif() |
45 changes: 45 additions & 0 deletions
45
easybuild/easyconfigs/f/face-recognition/face-recognition-1.3.0-foss-2023a-CUDA-12.1.1.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
easyblock = 'PythonBundle' | ||
|
||
name = 'face-recognition' | ||
version = '1.3.0' | ||
versionsuffix = '-CUDA-12.1.1' | ||
|
||
homepage = 'https://github.com/ageitgey/face_recognition' | ||
description = """Recognize and manipulate faces from Python or from the command line with | ||
the world’s simplest face recognition library.""" | ||
|
||
toolchain = {'name': 'foss', 'version': '2023a'} | ||
|
||
dependencies = [ | ||
('Python', '3.11.3'), | ||
('SciPy-bundle', '2023.07'), | ||
('Pillow', '10.0.0'), | ||
('dlib', '19.24.6', versionsuffix), | ||
] | ||
|
||
use_pip = True | ||
|
||
exts_list = [ | ||
('face-recognition-models', '0.3.0', { | ||
'sources': ['face_recognition_models-%(version)s.tar.gz'], | ||
'checksums': ['b79bd200a88c87c9a9d446c990ae71c5a626d1f3730174e6d570157ff1d896cf'], | ||
}), | ||
(name, version, { | ||
'sources': ['face_recognition-%(version)s.tar.gz'], | ||
'checksums': ['5e5efdd1686aa566af0d3cc1313b131e4b197657a8ffd03669e6d3fad92705ec'], | ||
}), | ||
] | ||
|
||
sanity_check_paths = { | ||
'files': ['bin/face_detection', 'bin/face_recognition'], | ||
'dirs': ['lib/python%(pyshortver)s/site-packages'], | ||
} | ||
|
||
sanity_check_commands = [ | ||
"face_detection --help", | ||
"face_recognition --help", | ||
] | ||
|
||
sanity_pip_check = True | ||
|
||
moduleclass = 'ai' |