-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support CUDA 11 except for CentOS (#205)
* feat: add windows script * fix: add condition of cuda 11 and minor bug * feat: add linux docker file and fix scripts for cuda 11 * fix: add directory for build * fix: update dlib for support cuda 11 on linux
- Loading branch information
1 parent
d6140f7
commit 04546ef
Showing
24 changed files
with
181 additions
and
7 deletions.
There are no files selected for viewing
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,12 @@ | ||
FROM nvidia/cuda:11.0-cudnn8-devel-centos7 | ||
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>" | ||
|
||
# install package to build | ||
RUN yum update -y && yum install -y \ | ||
ca-certificates | ||
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
RUN yum update -y && yum install -y \ | ||
libX11-devel \ | ||
lapack-devel \ | ||
openblas-devel \ | ||
&& yum clean all |
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,9 @@ | ||
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu16.04 | ||
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>" | ||
|
||
# install package to build | ||
RUN apt-get update && apt-get install -y \ | ||
libopenblas-dev \ | ||
liblapack-dev \ | ||
libx11-6 \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* |
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,47 @@ | ||
FROM nvidia/cuda:11.0-cudnn8-devel-centos7 | ||
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>" | ||
|
||
# install package to build | ||
RUN yum update -y && yum install -y \ | ||
ca-certificates | ||
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
RUN yum update -y && yum install -y \ | ||
libX11-devel \ | ||
lapack-devel \ | ||
openblas-devel \ | ||
cmake3 | ||
RUN yum groupinstall -y "Development Tools" | ||
|
||
# set compiler | ||
ENV CMAKE_C_COMPILER=/usr/bin/gcc | ||
ENV CMAKE_CXX_COMPILER=/usr/bin/g++ | ||
|
||
# set env to build by using CUDA | ||
ENV CUDA_PATH /usr/local/cuda | ||
ENV PATH $CUDA_PATH/bin:$PATH | ||
ENV CPATH $CUDA_PATH/include:$CPATH | ||
ENV LD_LIBRARY_PATH $CUDA_PATH/lib64:$LD_LIBRARY_PATH | ||
ENV NCCL_ROOT /usr/local/nccl | ||
ENV CPATH $NCCL_ROOT/include:$CPATH | ||
ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH | ||
ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH | ||
|
||
# Register Microsoft key and feed | ||
RUN yum update -y && yum install -y \ | ||
curl | ||
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo | ||
RUN yum update -y && yum install -y \ | ||
powershell \ | ||
&& yum clean all | ||
|
||
# user cmake 3 instead of cmake 2 | ||
RUN alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \ | ||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \ | ||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \ | ||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \ | ||
--family cmake | ||
RUN alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \ | ||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \ | ||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \ | ||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \ | ||
--family cmake |
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,35 @@ | ||
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu16.04 | ||
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>" | ||
|
||
# install package to build | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
libopenblas-dev \ | ||
liblapack-dev \ | ||
libx11-dev \ | ||
cmake \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# set compiler | ||
ENV CMAKE_C_COMPILER=/usr/bin/gcc | ||
ENV CMAKE_CXX_COMPILER=/usr/bin/g++ | ||
|
||
# set env to build by using CUDA | ||
ENV CUDA_PATH /usr/local/cuda | ||
ENV PATH $CUDA_PATH/bin:$PATH | ||
ENV CPATH $CUDA_PATH/include:$CPATH | ||
ENV LD_LIBRARY_PATH $CUDA_PATH/lib64:$LD_LIBRARY_PATH | ||
ENV NCCL_ROOT /usr/local/nccl | ||
ENV CPATH $NCCL_ROOT/include:$CPATH | ||
ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH | ||
ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH | ||
|
||
# Register Microsoft key and feed | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
apt-transport-https | ||
RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb | ||
RUN dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb | ||
RUN apt-get update && apt-get install -y \ | ||
powershell \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* |
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
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
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
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
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
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
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
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
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,53 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>DlibDotNet.CUDA110</id> | ||
<version>19.18.0.20200525</version> | ||
<title>DlibDotNet for CUDA 11.0</title> | ||
<authors>Takuya Takeuchi</authors> | ||
<owners>Takuya Takeuchi</owners> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<license type="file">LICENSE.txt</license> | ||
<projectUrl>https://github.com/takuya-takeuchi/DlibDotNet</projectUrl> | ||
<iconUrl>https://github.com/takuya-takeuchi/DlibDotNet/blob/master/nuget/ml128.png?raw=true</iconUrl> | ||
<description>Dlib wrapper library written in C++ and C# for Windows, MacOS and Linux | ||
|
||
Requirements: Visual C++ 2017 Redistributable Package and cudnn 8</description> | ||
<releaseNotes></releaseNotes> | ||
<copyright>© Takuya Takeuchi 2017-2020</copyright> | ||
<tags>dlib .net machinelearning</tags> | ||
<serviceable>true</serviceable> | ||
</metadata> | ||
|
||
<files> | ||
<file src="build\DlibDotNet.Native.props" target="build\DlibDotNet.props" /> | ||
<!-- allows the 'DlibDotNet' package to read runtimes\** folder --> | ||
<file src="build\DlibDotNet.targets" target="build\DlibDotNet.targets" /> | ||
<!-- cross-targetting via compile-time references --> | ||
<file src="ref\**\*" target="ref" /> | ||
<file src="..\artifacts\cuda-110\runtimes\**\*" target="runtimes" /> | ||
|
||
<file src="..\..\src\DlibDotNet\bin\Release\netstandard2.0\DlibDotNet.dll" target="lib\netstandard2.0" /> | ||
|
||
<file src="..\artifacts\cuda-110\runtimes\win-x64\native\DlibDotNetNative.dll" target="runtimes\win-x64\native\DlibDotNetNative.dll" /> | ||
<file src="..\artifacts\cuda-110\runtimes\win-x64\native\DlibDotNetNativeDnn.dll" target="runtimes\win-x64\native\DlibDotNetNativeDnn.dll" /> | ||
<file src="..\artifacts\cuda-110\runtimes\linux-x64\native\libDlibDotNetNative.so" target="runtimes\linux-x64\native\libDlibDotNetNative.so" /> | ||
<file src="..\artifacts\cuda-110\runtimes\linux-x64\native\libDlibDotNetNativeDnn.so" target="runtimes\linux-x64\native\libDlibDotNetNativeDnn.so" /> | ||
<file src="..\artifacts\cuda-110\runtimes\centos-x64\native\libDlibDotNetNative.so" target="runtimes\centos-x64\native\libDlibDotNetNative.so" /> | ||
<file src="..\artifacts\cuda-110\runtimes\centos-x64\native\libDlibDotNetNativeDnn.so" target="runtimes\centos-x64\native\libDlibDotNetNativeDnn.so" /> | ||
|
||
<!-- | ||
<file src="..\artifacts\cuda-110\runtimes\osx-x64\native\libDlibDotNetNative.dylib" target="runtimes\osx-x64\native\libDlibDotNetNative.dylib" /> | ||
<file src="..\artifacts\cuda-110\runtimes\osx-x64\native\libDlibDotNetNativeDnn.dylib" target="runtimes\osx-x64\native\libDlibDotNetNativeDnn.dylib" /> | ||
--> | ||
|
||
<!-- license --> | ||
<file src="..\..\LICENSE.txt" target="" /> | ||
<file src="..\..\Licenses\dlib.txt" target="licenses" /> | ||
<file src="..\..\Licenses\giflib.txt" target="licenses" /> | ||
<file src="..\..\Licenses\libjpeg.txt" target="licenses" /> | ||
<file src="..\..\Licenses\libpng.txt" target="licenses" /> | ||
<file src="..\..\Licenses\zlib.txt" target="licenses" /> | ||
</files> | ||
|
||
</package> |
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
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
Submodule dlib
updated
8 files
+0 −8 | dlib/CMakeLists.txt | |
+2 −2 | dlib/cuda/cuda_dlib.cu | |
+152 −121 | dlib/cuda/cudnn_dlibapi.cpp | |
+4 −0 | dlib/cuda/cudnn_dlibapi.h | |
+131 −84 | dlib/global_optimization/find_max_global.h | |
+132 −72 | dlib/global_optimization/find_max_global_abstract.h | |
+3 −3 | dlib/test/cca.cpp | |
+5 −0 | dlib/test/global_optimization.cpp |