2016-03-09 15:33:06 +03:00
|
|
|
#!/bin/bash
|
2017-03-08 13:10:01 +03:00
|
|
|
#
|
2016-03-09 15:33:06 +03:00
|
|
|
# Copyright (c) Microsoft. All rights reserved.
|
|
|
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
2017-03-08 13:10:01 +03:00
|
|
|
#
|
|
|
|
# WARNING. This will run in Microsoft Internal Environment ONLY, to generate CNTK binary drops.
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
scriptName="$(basename "${BASH_SOURCE[0]}")"
|
|
|
|
scriptDir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
parsedArgs=$(getopt -o '' --long target-configuration:,verbose,release-tag:,commit: -n "$scriptName" -- "$@")
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
[ $? != 0 ] && {
|
|
|
|
echo Terminating...
|
|
|
|
exit 1
|
|
|
|
}
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
eval set -- "$parsedArgs"
|
|
|
|
|
|
|
|
targetConfiguration=
|
|
|
|
verbose= # TODO
|
|
|
|
releaseTag=unknown
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
case "$1" in
|
|
|
|
--target-configuration)
|
|
|
|
targetConfiguration="${2,,}"
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
--commit)
|
|
|
|
commit="${2,,}"
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
--release-tag)
|
|
|
|
releaseTag="${2,,}"
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
--verbose)
|
|
|
|
verbose=1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--)
|
|
|
|
shift
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
[ $# = 0 ] || {
|
|
|
|
echo Extra parameters detected: $*
|
|
|
|
exit 1
|
|
|
|
}
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
[[ -n $commit ]] || {
|
|
|
|
echo Must specify --commit option.
|
|
|
|
exit 1
|
|
|
|
}
|
2016-03-11 15:19:01 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
case $targetConfiguration in
|
|
|
|
cpu)
|
|
|
|
publicTargetConfiguration=CPU-Only
|
2016-03-11 15:19:01 +03:00
|
|
|
;;
|
2017-03-08 13:10:01 +03:00
|
|
|
gpu)
|
|
|
|
publicTargetConfiguration=GPU
|
2016-03-11 15:19:01 +03:00
|
|
|
;;
|
2017-03-08 13:10:01 +03:00
|
|
|
1bitsgd)
|
|
|
|
publicTargetConfiguration=GPU-1bit-SGD
|
2017-02-10 12:35:55 +03:00
|
|
|
;;
|
2017-03-08 13:10:01 +03:00
|
|
|
'')
|
|
|
|
echo Must specify --target-configuration option.
|
2016-03-11 15:19:01 +03:00
|
|
|
exit 1
|
|
|
|
;;
|
2017-03-08 13:10:01 +03:00
|
|
|
*)
|
|
|
|
echo Unknown target configuration $targetConfiguration.
|
2016-03-11 15:19:01 +03:00
|
|
|
exit 1
|
|
|
|
;;
|
2017-03-08 13:10:01 +03:00
|
|
|
esac
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
[[ $releaseTag = unknown ]] || [[ $releaseTag =~ ^[1-9][0-9a-z-]*$ ]] || {
|
2017-05-29 22:02:59 +03:00
|
|
|
echo \'--release-tag $releaseTag\' option does not match expected format.
|
2017-03-08 13:10:01 +03:00
|
|
|
exit 1
|
|
|
|
}
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
outputFile=CNTK-$releaseTag-Linux-64bit-$publicTargetConfiguration.tar.gz
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
# Stop on Error
|
|
|
|
set -e -o pipefail
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
# Enable verbose mode if needed
|
2016-03-09 15:33:06 +03:00
|
|
|
# stderr is NOT changed
|
2017-03-08 13:10:01 +03:00
|
|
|
if [[ -n $verbose ]]; then
|
2016-03-11 15:19:01 +03:00
|
|
|
exec 3>&1
|
2016-03-09 15:33:06 +03:00
|
|
|
else
|
2016-03-11 15:19:01 +03:00
|
|
|
exec 3>/dev/null
|
2016-03-09 15:33:06 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Define helper function
|
|
|
|
|
|
|
|
# File List Copy function
|
|
|
|
# usage: CopyFilesFromList source_path file_name_array destination_path
|
|
|
|
function CopyFilesFromList ()
|
|
|
|
{
|
2016-03-11 15:19:01 +03:00
|
|
|
declare -a fileNames=(${!2})
|
2017-02-10 12:35:55 +03:00
|
|
|
for fileName in "${fileNames[@]}"
|
2016-03-11 15:19:01 +03:00
|
|
|
do
|
2017-02-10 12:35:55 +03:00
|
|
|
cp -p "$1/$fileName" "$3"
|
2016-03-11 15:19:01 +03:00
|
|
|
done
|
2016-03-09 15:33:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
# Main script
|
|
|
|
|
|
|
|
echo "Making binary drops..." >&3
|
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
cd "$scriptDir/.."
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# Dependency files
|
|
|
|
|
2016-07-06 12:46:31 +03:00
|
|
|
# MKL
|
CNTK support for CUDA 9
CNTK now supports CUDA 9/cuDNN 7. This requires an update to build environment to Ubuntu 16/GCC 5 for Linux, and Visual Studio 2017/VCTools 14.11 for Windows. With CUDA 9, CNTK also added a preview for 16-bit floating point (a.k.a FP16) computation.
Please check out the example of FP16 in ResNet50 at /Examples/Image/Classification/ResNet/Python/TrainResNet_ImageNet_Distributed.py
Notes on FP16 preview:
* FP16 implementation on CPU is not optimized, and it's not supposed to be used in CPU inference directly. User needs to convert the model to 32-bit floating point before running on CPU.
* Loss/Criterion for FP16 training needs to be 32bit for accumulation without overflow, using cast function. Please check the example above.
* Readers do not have FP16 output unless using numpy to feed data, cast from FP32 to FP16 is needed. Please check the example above.
* FP16 gradient aggregation is currently only implemented on GPU using NCCL2. Distributed training with FP16 with MPI is not supported.
* FP16 math is a subset of current FP32 implementation. Some model may get Feature Not Implemented exception using FP16.
* FP16 is currently not supported in BrainScript. Please use Python for FP16.
To setup build and runtime environment on Windows:
* Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) with following workloads and components. From command line (use Community version installer as example):
vs_community.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.PythonTools --add Microsoft.VisualStudio.Component.VC.Tools.14.11
* Install [NVidia CUDA 9](https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64)
* From PowerShell, run:
/Tools/devInstall/Windows/DevInstall.ps1
* Start VCTools 14.11 command line, run:
cmd /k "%VS2017INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 --vcvars_ver=14.11
* Open /CNTK.sln from the VCTools 14.11 command line. Note that starting CNTK.sln other than VCTools 14.11 command line, would causes CUDA 9 [build error](https://developercommunity.visualstudio.com/content/problem/163758/vs-2017-155-doesnt-support-cuda-9.html).
To setup build and runtime environment on Linux using docker, please build Unbuntu 16.04 docker image using Dockerfiles /Tools/docker. For other Linux systems, please refer to the Dockerfiles to setup dependent libraries for CNTK.
2018-01-23 03:58:56 +03:00
|
|
|
declare -a mklFiles=("libmklml_intel.so" "libiomp5.so" "libmkldnn.so.0.12.0")
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# Open CV
|
2016-07-06 12:46:31 +03:00
|
|
|
declare -a opencvFiles=("libopencv_core.so.3.1" "libopencv_imgproc.so.3.1" "libopencv_imgproc.so.3.1" "libopencv_imgcodecs.so.3.1")
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2016-03-31 21:27:27 +03:00
|
|
|
# libzip
|
2016-10-12 17:28:20 +03:00
|
|
|
declare -a libzipFiles=("libzip.so.4")
|
2016-03-31 21:27:27 +03:00
|
|
|
|
2016-03-11 15:19:01 +03:00
|
|
|
# CUDA
|
2016-12-07 17:37:03 +03:00
|
|
|
declare -a cudaFiles=("libcudart.so.8.0" "libcublas.so.8.0" "libcurand.so.8.0" "libcusparse.so.8.0")
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# cuDNN
|
2016-11-17 16:07:20 +03:00
|
|
|
# Note: can be only a single file currently, see copy below.
|
2016-11-16 13:19:46 +03:00
|
|
|
declare -a cudnnFiles=("libcudnn.so")
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2016-10-13 17:53:55 +03:00
|
|
|
# OpenBLAS (Needed by Kaldi)
|
|
|
|
declare -a openblasFiles=("libopenblas.so.0")
|
|
|
|
|
|
|
|
# Kaldi
|
|
|
|
declare -a kaldiFiles=("libkaldi-util.so" "libkaldi-matrix.so" "libkaldi-base.so" "libkaldi-hmm.so" "libkaldi-cudamatrix.so" "libkaldi-nnet.so" "libkaldi-lat.so" "libkaldi-tree.so")
|
|
|
|
|
|
|
|
# OpenFst (from Kaldi)
|
|
|
|
declare -a openfstFiles=("libfst.so.3")
|
|
|
|
|
2016-07-12 12:11:45 +03:00
|
|
|
# Include files
|
|
|
|
declare -a includeFiles=("Eval.h")
|
|
|
|
|
2016-10-20 17:26:06 +03:00
|
|
|
# Include files 2.0
|
2017-12-05 11:46:22 +03:00
|
|
|
declare -a includeFiles20=("CNTKLibrary.h" "CNTKLibraryInternals.h" "CNTKLibraryC.h")
|
2016-10-20 17:26:06 +03:00
|
|
|
|
2016-03-09 15:33:06 +03:00
|
|
|
# Set dependency sources paths
|
CNTK support for CUDA 9
CNTK now supports CUDA 9/cuDNN 7. This requires an update to build environment to Ubuntu 16/GCC 5 for Linux, and Visual Studio 2017/VCTools 14.11 for Windows. With CUDA 9, CNTK also added a preview for 16-bit floating point (a.k.a FP16) computation.
Please check out the example of FP16 in ResNet50 at /Examples/Image/Classification/ResNet/Python/TrainResNet_ImageNet_Distributed.py
Notes on FP16 preview:
* FP16 implementation on CPU is not optimized, and it's not supposed to be used in CPU inference directly. User needs to convert the model to 32-bit floating point before running on CPU.
* Loss/Criterion for FP16 training needs to be 32bit for accumulation without overflow, using cast function. Please check the example above.
* Readers do not have FP16 output unless using numpy to feed data, cast from FP32 to FP16 is needed. Please check the example above.
* FP16 gradient aggregation is currently only implemented on GPU using NCCL2. Distributed training with FP16 with MPI is not supported.
* FP16 math is a subset of current FP32 implementation. Some model may get Feature Not Implemented exception using FP16.
* FP16 is currently not supported in BrainScript. Please use Python for FP16.
To setup build and runtime environment on Windows:
* Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) with following workloads and components. From command line (use Community version installer as example):
vs_community.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.PythonTools --add Microsoft.VisualStudio.Component.VC.Tools.14.11
* Install [NVidia CUDA 9](https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64)
* From PowerShell, run:
/Tools/devInstall/Windows/DevInstall.ps1
* Start VCTools 14.11 command line, run:
cmd /k "%VS2017INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 --vcvars_ver=14.11
* Open /CNTK.sln from the VCTools 14.11 command line. Note that starting CNTK.sln other than VCTools 14.11 command line, would causes CUDA 9 [build error](https://developercommunity.visualstudio.com/content/problem/163758/vs-2017-155-doesnt-support-cuda-9.html).
To setup build and runtime environment on Linux using docker, please build Unbuntu 16.04 docker image using Dockerfiles /Tools/docker. For other Linux systems, please refer to the Dockerfiles to setup dependent libraries for CNTK.
2018-01-23 03:58:56 +03:00
|
|
|
mklPath="/usr/local/lib"
|
2016-10-13 17:53:55 +03:00
|
|
|
opencvVersion="3.1.0"
|
|
|
|
opencvPath="/usr/local/opencv-$opencvVersion/lib"
|
2016-03-31 21:27:27 +03:00
|
|
|
libzipPath="/usr/local/lib"
|
2016-03-09 15:33:06 +03:00
|
|
|
cudaPath="/usr/local/cuda/lib64"
|
2017-05-29 22:02:59 +03:00
|
|
|
cudnnPath="/usr/local/cudnn-6.0/cuda/lib64"
|
2016-10-13 17:53:55 +03:00
|
|
|
openblasPath="/usr/local/openblas/lib"
|
|
|
|
kaldiVersion="c024e8aa"
|
|
|
|
kaldiPath="/usr/local/kaldi-$kaldiVersion/src/lib"
|
|
|
|
openfstPath="/usr/local/kaldi-$kaldiVersion/tools/openfst/lib"
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# Set build paths
|
2017-03-08 13:10:01 +03:00
|
|
|
buildPath="build/$targetConfiguration/release"
|
2016-03-09 15:33:06 +03:00
|
|
|
basePath="BinaryDrops"
|
2016-03-11 15:19:01 +03:00
|
|
|
baseDropPath="$basePath/cntk"
|
|
|
|
baseBinariesPath="$baseDropPath/cntk"
|
|
|
|
baseDependenciesPath="$baseBinariesPath/dependencies/lib"
|
2016-07-12 12:36:57 +03:00
|
|
|
baseIncludePath="$baseDropPath/Include"
|
2016-07-12 12:11:45 +03:00
|
|
|
includePath="Source/Common/Include"
|
2016-10-20 17:26:06 +03:00
|
|
|
includePath20="Source/CNTKv2LibraryDll/API"
|
2017-03-08 13:10:01 +03:00
|
|
|
extrasPath="Tools/cntk-binary-drop/linux/$targetConfiguration"
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# Make BinaryDrops directory
|
|
|
|
mkdir -p $baseBinariesPath
|
|
|
|
|
2017-02-22 13:20:10 +03:00
|
|
|
echo "Copying Python wheels..." >&3
|
2017-03-08 13:10:01 +03:00
|
|
|
mkdir $basePath/$publicTargetConfiguration
|
|
|
|
cp -p $buildPath/python/*.whl $basePath/$publicTargetConfiguration
|
2017-02-22 13:20:10 +03:00
|
|
|
|
2016-03-11 15:19:01 +03:00
|
|
|
echo "Copying build binaries..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
cp -pr $buildPath/* $baseBinariesPath
|
2017-02-22 13:20:10 +03:00
|
|
|
# Remove unnecessary file(s) if exist(s)
|
2016-12-03 18:49:17 +03:00
|
|
|
#
|
|
|
|
# General TODO: Implement White List of Binary Drop contents.
|
|
|
|
# For the time being "cherry pick" removal of unneeded files
|
|
|
|
#
|
2016-08-29 15:58:32 +03:00
|
|
|
rm -f $baseBinariesPath/bin/brainscripttests
|
2016-07-07 12:06:38 +03:00
|
|
|
rm -f $baseBinariesPath/bin/cppevalclient
|
2016-12-03 18:49:17 +03:00
|
|
|
rm -f $baseBinariesPath/bin/cppevalextendedclient
|
|
|
|
rm -f $baseBinariesPath/bin/cppevalv2client
|
2016-08-29 15:58:32 +03:00
|
|
|
rm -f $baseBinariesPath/bin/evaltests
|
|
|
|
rm -f $baseBinariesPath/bin/mathtests
|
2016-12-03 18:49:17 +03:00
|
|
|
rm -f $baseBinariesPath/bin/multiversotests
|
2016-08-29 15:58:32 +03:00
|
|
|
rm -f $baseBinariesPath/bin/networktests
|
|
|
|
rm -f $baseBinariesPath/bin/readertests
|
2017-02-10 12:35:55 +03:00
|
|
|
rm -f $baseBinariesPath/bin/V2LibraryEndToEndTests
|
2016-08-29 15:58:32 +03:00
|
|
|
rm -f $baseBinariesPath/bin/v2librarytests
|
2017-03-08 13:10:01 +03:00
|
|
|
rm -rf $baseBinariesPath/python
|
2017-05-17 16:45:26 +03:00
|
|
|
rm -f $baseBinariesPath/lib/java/Main.class
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2016-07-12 12:11:45 +03:00
|
|
|
# Make Include directory
|
|
|
|
mkdir -p $baseIncludePath
|
|
|
|
|
|
|
|
# Copy Include
|
2016-07-12 12:30:05 +03:00
|
|
|
echo "Copying Include files..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
CopyFilesFromList $includePath includeFiles[@] $baseIncludePath
|
2016-10-20 17:26:06 +03:00
|
|
|
echo "Copying Include files for Version 2..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
CopyFilesFromList $includePath20 includeFiles20[@] $baseIncludePath
|
2016-07-12 12:11:45 +03:00
|
|
|
|
2016-03-09 15:33:06 +03:00
|
|
|
# Copy Examples
|
|
|
|
echo "Copying Examples..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
cp -pr Examples $baseDropPath
|
2016-07-06 16:57:25 +03:00
|
|
|
|
2016-11-10 14:24:02 +03:00
|
|
|
# Copy Tutorials
|
|
|
|
echo "Copying Tutorials..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
cp -pr Tutorials $baseDropPath
|
2016-11-10 14:24:02 +03:00
|
|
|
|
2017-09-11 22:51:47 +03:00
|
|
|
# Copy PretrainedModels
|
|
|
|
echo "Copying PretrainedModels..." >&3
|
|
|
|
cp -pr PretrainedModels $baseDropPath
|
|
|
|
|
2017-07-28 15:56:38 +03:00
|
|
|
# Copy Manual
|
|
|
|
echo "Copying Manual..." >&3
|
|
|
|
cp -pr Manual $baseDropPath
|
|
|
|
|
2016-07-06 16:57:25 +03:00
|
|
|
# Copy Scripts (Scripts folder from the root of the Repo)
|
|
|
|
echo "Copying Scripts..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
cp -pr Scripts $baseDropPath
|
|
|
|
# Remove some unneeded files
|
2016-07-07 10:17:08 +03:00
|
|
|
rm -f $baseDropPath/Scripts/pytest.ini
|
2017-02-10 12:35:55 +03:00
|
|
|
rm -rf $baseDropPath/Scripts/install/windows
|
2016-07-07 10:17:08 +03:00
|
|
|
|
2016-03-09 15:33:06 +03:00
|
|
|
# Copy Extras
|
|
|
|
echo "Copying Extras..." >&3
|
2017-02-10 12:35:55 +03:00
|
|
|
cp -pr $extrasPath/* $baseDropPath
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# Copy Dependencies
|
|
|
|
echo "Copying Dependencies..." >&3
|
|
|
|
|
|
|
|
# Make dependencies directory
|
|
|
|
mkdir -p $baseDependenciesPath
|
|
|
|
|
2016-07-06 12:46:31 +03:00
|
|
|
# Copy MKL
|
|
|
|
echo "Copying MKL" >&3
|
|
|
|
CopyFilesFromList $mklPath mklFiles[@] $baseDependenciesPath
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
# Copy Open CV
|
|
|
|
echo "Copying Open CV..." >&3
|
|
|
|
CopyFilesFromList $opencvPath opencvFiles[@] $baseDependenciesPath
|
|
|
|
|
2016-03-31 21:27:27 +03:00
|
|
|
# Copy libzip
|
|
|
|
echo "Copying libzip..." >&3
|
|
|
|
CopyFilesFromList $libzipPath libzipFiles[@] $baseDependenciesPath
|
|
|
|
|
2016-10-13 17:53:55 +03:00
|
|
|
# Copy OpenBLAS (for Kaldi)
|
|
|
|
echo "Copying OpenBLAS (for Kaldi)..." >&3
|
|
|
|
CopyFilesFromList $openblasPath openblasFiles[@] $baseDependenciesPath
|
|
|
|
|
|
|
|
# Copy Kaldi
|
|
|
|
echo "Copying Kaldi..." >&3
|
|
|
|
CopyFilesFromList $kaldiPath kaldiFiles[@] $baseDependenciesPath
|
|
|
|
|
|
|
|
# Copy OpenFst (from Kaldi)
|
|
|
|
echo "Copying OpenFst (Kaldi)..." >&3
|
|
|
|
CopyFilesFromList $openfstPath openfstFiles[@] $baseDependenciesPath
|
|
|
|
|
2016-03-09 15:33:06 +03:00
|
|
|
# GPU Drops only
|
2017-03-08 13:10:01 +03:00
|
|
|
if [[ $targetConfiguration != "cpu" ]]; then
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2016-03-11 15:19:01 +03:00
|
|
|
# Copy CUDA
|
|
|
|
echo "Copying CUDA..." >&3
|
|
|
|
CopyFilesFromList $cudaPath cudaFiles[@] $baseDependenciesPath
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2016-03-11 15:19:01 +03:00
|
|
|
# Copy cuDNN
|
|
|
|
echo "Copying cuDNN..." >&3
|
2017-05-29 22:02:59 +03:00
|
|
|
CopyFilesFromList $cudnnPath cudnnFiles[@] $baseDependenciesPath/libcudnn.so.6
|
2016-03-09 15:33:06 +03:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
2017-03-08 13:10:01 +03:00
|
|
|
echo "Creating version.txt file" >&3
|
|
|
|
printf 'CNTK-%s\nRelease\n%s\n%s\n' \
|
|
|
|
"$releaseTag" "$publicTargetConfiguration" "$commit" \
|
|
|
|
> $baseDropPath/version.txt
|
|
|
|
|
2016-03-09 15:33:06 +03:00
|
|
|
echo "Making Archive and cleaning up..." >&3
|
|
|
|
# Make GZipped TAR
|
|
|
|
cd $basePath
|
2017-02-22 13:20:10 +03:00
|
|
|
tar --owner=root ${verbose:+-v} -czf "$outputFile" cntk
|
2016-03-09 15:33:06 +03:00
|
|
|
|
2017-02-22 13:20:10 +03:00
|
|
|
# Log some file hashes
|
2017-03-08 13:10:01 +03:00
|
|
|
sha256sum "$outputFile" $publicTargetConfiguration/*.whl
|
2017-02-10 12:35:55 +03:00
|
|
|
|
2016-03-09 15:33:06 +03:00
|
|
|
# Remove TAR sources
|
|
|
|
rm -r cntk
|