From 9dd61ab700fce9785c2333c9946e8af6ac273a50 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Tue, 30 Jul 2019 20:20:49 -0500 Subject: [PATCH] add redist-windows-gpu --- src/SciSharp.TensorFlow.Redist/README.md | 10 +- .../{Redist.nuspec => Redist-CPU.nuspec} | 2 +- .../Redist-Windows-GPU.nuspec | 26 +++ ... SciSharp.TensorFlow.Redist-CPU.nupkgproj} | 2 +- ...rp.TensorFlow.Redist-Windows-GPU.nupkgproj | 187 ++++++++++++++++++ ...nsorflow-gpu-windows-x86_64-1.14.0.zip.sha | 1 + 6 files changed, 224 insertions(+), 4 deletions(-) rename src/SciSharp.TensorFlow.Redist/{Redist.nuspec => Redist-CPU.nuspec} (89%) create mode 100644 src/SciSharp.TensorFlow.Redist/Redist-Windows-GPU.nuspec rename src/SciSharp.TensorFlow.Redist/{SciSharp.TensorFlow.Redist.nupkgproj => SciSharp.TensorFlow.Redist-CPU.nupkgproj} (99%) create mode 100644 src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-Windows-GPU.nupkgproj create mode 100644 src/SciSharp.TensorFlow.Redist/libtensorflow-gpu-windows-x86_64-1.14.0.zip.sha diff --git a/src/SciSharp.TensorFlow.Redist/README.md b/src/SciSharp.TensorFlow.Redist/README.md index 3f75c4cf..5bdf82a1 100644 --- a/src/SciSharp.TensorFlow.Redist/README.md +++ b/src/SciSharp.TensorFlow.Redist/README.md @@ -1,8 +1,14 @@ ## SciSharp.TensorFlow.Redist ## -`SciSharp.TensorFlow.Redist` is a migration from [Microsoft.ML.TensorFlow.Redist](https://github.com/dotnet/machinelearning/tree/release/1.2/src/Redist/Microsoft.ML.TensorFlow.Redist). [ML.NET](https://github.com/dotnet/machinelearning) team will not maintain the package since [ML.NET](https://www.nuget.org/packages/Microsoft.ML) v1.4.0 going forward. +`SciSharp.TensorFlow.Redist` is a migration from [Microsoft.ML.TensorFlow.Redist](https://github.com/dotnet/machinelearning/tree/release/1.2/src/Redist/Microsoft.ML.TensorFlow.Redist). [ML.NET](https://github.com/dotnet/machinelearning) team will not maintain the package since [ML.NET](https://www.nuget.org/packages/Microsoft.ML) v1.3.0 going forward. +* CPU version for all platforms (Windows, Linux, OSX) +```powershell +PM> Install-Package SciSharp.TensorFlow.Redist +``` + +* GPU version for Windows ```powershell PM> Install-Package SciSharp.TensorFlow.Redist ``` @@ -16,7 +22,7 @@ Related merged [commits](https://github.com/SciSharp/TensorFlow.NET/commit/854a5 On Windows, the tar command does not support extracting archives with symlinks. So when `dotnet pack` runs on Windows it will only package the Windows binaries. 1. Run `dotnet pack` under `src/SciSharp.TensorFlow.Redist` directory in Linux. -2. Run `nuget push SciSharp.TensorFlow.Redist.1.14.0.nupkg -k APIKEY -s https://api.nuget.org/v3/index.json` +2. Run `dotnet nuget push SciSharp.TensorFlow.Redist.1.14.0.nupkg -k APIKEY -s https://api.nuget.org/v3/index.json` diff --git a/src/SciSharp.TensorFlow.Redist/Redist.nuspec b/src/SciSharp.TensorFlow.Redist/Redist-CPU.nuspec similarity index 89% rename from src/SciSharp.TensorFlow.Redist/Redist.nuspec rename to src/SciSharp.TensorFlow.Redist/Redist-CPU.nuspec index d2527c8b..11919e8c 100644 --- a/src/SciSharp.TensorFlow.Redist/Redist.nuspec +++ b/src/SciSharp.TensorFlow.Redist/Redist-CPU.nuspec @@ -9,7 +9,7 @@ LICENSE.txt https://aka.ms/deprecateLicenseUrl https://www.tensorflow.org/ - $packageId$ contains the TensorFlow C library version $version$ redistributed as a NuGet package. + $packageId$ contains the TensorFlow C library CPU version $version$ redistributed as a NuGet package. https://github.com/tensorflow/tensorflow/releases/tag/v$version$ Copyright 2019 The TensorFlow Authors. All rights reserved. TensorFlow diff --git a/src/SciSharp.TensorFlow.Redist/Redist-Windows-GPU.nuspec b/src/SciSharp.TensorFlow.Redist/Redist-Windows-GPU.nuspec new file mode 100644 index 00000000..f010c96b --- /dev/null +++ b/src/SciSharp.TensorFlow.Redist/Redist-Windows-GPU.nuspec @@ -0,0 +1,26 @@ + + + + $packageId$ + $version$ + The TensorFlow Authors + The TensorFlow Authors + true + LICENSE.txt + https://aka.ms/deprecateLicenseUrl + https://www.tensorflow.org/ + $packageId$ contains the TensorFlow C library GPU version $version$ redistributed as a NuGet package. + https://github.com/tensorflow/tensorflow/releases/tag/v$version$ + Copyright 2019 The TensorFlow Authors. All rights reserved. + TensorFlow + + + + + + + + + + + \ No newline at end of file diff --git a/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist.nupkgproj b/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-CPU.nupkgproj similarity index 99% rename from src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist.nupkgproj rename to src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-CPU.nupkgproj index a0ca0a0a..6a225ede 100644 --- a/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist.nupkgproj +++ b/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-CPU.nupkgproj @@ -17,7 +17,7 @@ true false - Redist.nuspec + Redist-CPU.nuspec packageId=$(PackageId);version=$(PackageVersion) $(ProjDir) diff --git a/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-Windows-GPU.nupkgproj b/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-Windows-GPU.nupkgproj new file mode 100644 index 00000000..08fd9386 --- /dev/null +++ b/src/SciSharp.TensorFlow.Redist/SciSharp.TensorFlow.Redist-Windows-GPU.nupkgproj @@ -0,0 +1,187 @@ + + + + $(MSBuildThisFileDirectory) + $(ProjDir)bin\ + $(ProjDir)obj\ + + x64 + netstandard2.0 + 1.14.0 + 1 + + $(BinDir)packages\ + $(MSBuildProjectName) + $(TensorFlowVersion) + + true + false + + Redist-Windows-GPU.nuspec + packageId=$(PackageId);version=$(PackageVersion) + $(ProjDir) + + CopyFilesFromArchive + + win + linux + osx + $(PackageRid)-$(TargetArchitecture) + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + <_downloadFiles Include="@(TensorFlowArchive);@(AdditionalDownloadFile)" Url="%(Identity)" DestinationFile="%(DownloadFile)" /> + + + + + + + + + + + + + + + + + + + + + + @(FilesWithHashes->'%(FileHash)') + $([System.IO.File]::ReadAllText('%(LocalShaFile)').Replace("%0A", "").Replace("%0D", "")) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_fileFromArchive Include="%(TensorFlowArchive.FilesFromArchive)" ExtractDirectory="%(TensorFlowArchive.ExtractDirectory)" Runtime="%(TensorFlowArchive.Runtime)" /> + <_fileFromArchive DestinationFile="%(FileName)%(Extension)"/> + <_fileFromArchive PackagePath="runtimes\%(_fileFromArchive.Runtime)\native\%(_fileFromArchive.DestinationFile)" /> + + + <_fileFromArchive Condition="'%(DestinationFile)' == 'LICENSE'" PackagePath="THIRD_PARTY_NOTICES.txt" Runtime="" /> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SciSharp.TensorFlow.Redist/libtensorflow-gpu-windows-x86_64-1.14.0.zip.sha b/src/SciSharp.TensorFlow.Redist/libtensorflow-gpu-windows-x86_64-1.14.0.zip.sha new file mode 100644 index 00000000..739129b1 --- /dev/null +++ b/src/SciSharp.TensorFlow.Redist/libtensorflow-gpu-windows-x86_64-1.14.0.zip.sha @@ -0,0 +1 @@ +850A27858FA951DF77A78CD1BD78B54F6EE2532DD5A49F0579A7B02C795C62F0212F20177EAEA2BD77BD451A57FBBD1348362492F9E14BFE5CA5028C71711293