This commit is contained in:
Mark Hillebrand 2016-10-27 12:46:02 +02:00
Родитель 9f8f87c896
Коммит 72b28630fd
4 изменённых файлов: 469 добавлений и 469 удалений

312
Dependencies/CNTKCustomMKL/build-windows.cmd поставляемый
Просмотреть файл

@ -1,156 +1,156 @@
@echo off @echo off
REM REM
REM Copyright (c) Microsoft. All rights reserved. REM Copyright (c) Microsoft. All rights reserved.
REM REM
REM Licensed under the MIT license. See LICENSE.md file in the project root REM Licensed under the MIT license. See LICENSE.md file in the project root
REM for full license information. REM for full license information.
REM ============================================================================== REM ==============================================================================
REM REM
echo. echo.
echo This batch file will build a custom MKL dynamic link library for usage by CNTK. echo This batch file will build a custom MKL dynamic link library for usage by CNTK.
echo. echo.
echo Requirements: echo Requirements:
echo - Intel MKL SDK installed on the machine echo - Intel MKL SDK installed on the machine
echo - MKLROOT environment variable is set to the MKL directory inside the Intel MKL SDK echo - MKLROOT environment variable is set to the MKL directory inside the Intel MKL SDK
echo - Visual Studio 2013 installed and included in the path echo - Visual Studio 2013 installed and included in the path
echo. echo.
setlocal enableextensions enabledelayedexpansion setlocal enableextensions enabledelayedexpansion
pushd "%~dp0" pushd "%~dp0"
if errorlevel 1 ( if errorlevel 1 (
echo Could not change directory to script location. echo Could not change directory to script location.
exit /b 1 exit /b 1
) )
if not defined MKLROOT ( if not defined MKLROOT (
echo Error: Environment variable MKLROOT is undefined. echo Error: Environment variable MKLROOT is undefined.
exit /b 1 exit /b 1
) )
if not exist "%MKLROOT%" ( if not exist "%MKLROOT%" (
echo Error: Directory doesn't exist: "%MKLROOT%". echo Error: Directory doesn't exist: "%MKLROOT%".
exit /b 1 exit /b 1
) )
set MKLBUILDERROOT=%MKLROOT%\tools\builder set MKLBUILDERROOT=%MKLROOT%\tools\builder
if not exist "%MKLBUILDERROOT%" ( if not exist "%MKLBUILDERROOT%" (
echo Error: Directory doesn't exist: "%MKLBUILDERROOT%". echo Error: Directory doesn't exist: "%MKLBUILDERROOT%".
exit /b 1 exit /b 1
) )
where /q nmake.exe where /q nmake.exe
if errorlevel 1 ( if errorlevel 1 (
echo Error: NMAKE.EXE not in path. echo Error: NMAKE.EXE not in path.
exit /b 1 exit /b 1
) )
where /q link.exe where /q link.exe
if errorlevel 1 ( if errorlevel 1 (
echo Error: LINK.EXE not in path. echo Error: LINK.EXE not in path.
exit /b 1 exit /b 1
) )
set /p CNTKCUSTOMMKLVERSION=<version.txt set /p CNTKCUSTOMMKLVERSION=<version.txt
if not defined CNTKCUSTOMMKLVERSION ( if not defined CNTKCUSTOMMKLVERSION (
echo Cannot determine CNTK custom MKL version. echo Cannot determine CNTK custom MKL version.
exit /b 1 exit /b 1
) )
if exist lib rmdir /s /q lib if exist lib rmdir /s /q lib
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
if exist Publish rmdir /s /q Publish if exist Publish rmdir /s /q Publish
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
mkdir Publish\%CNTKCUSTOMMKLVERSION%\x64 mkdir Publish\%CNTKCUSTOMMKLVERSION%\x64
echo. echo.
echo Copying "%MKLBUILDERROOT%\lib". echo Copying "%MKLBUILDERROOT%\lib".
xcopy /s /e /y /i "%MKLBUILDERROOT%\lib" lib xcopy /s /e /y /i "%MKLBUILDERROOT%\lib" lib
if errorlevel 1 ( if errorlevel 1 (
exit /b 1 exit /b 1
) )
echo. echo.
echo Compiling and copying libraries. echo Compiling and copying libraries.
for %%t in ( for %%t in (
parallel parallel
sequential sequential
) do ( ) do (
set TFIRSTCHAR=%%t set TFIRSTCHAR=%%t
set TFIRSTCHAR=!TFIRSTCHAR:~0,1! set TFIRSTCHAR=!TFIRSTCHAR:~0,1!
set LIBBASENAME=mkl_cntk_!TFIRSTCHAR! set LIBBASENAME=mkl_cntk_!TFIRSTCHAR!
echo. echo.
echo Calling NMAKE libintel64 export=functions.txt threading=%%t name=!LIBBASENAME! MKLROOT="%MKLROOT%". echo Calling NMAKE libintel64 export=functions.txt threading=%%t name=!LIBBASENAME! MKLROOT="%MKLROOT%".
NMAKE /f "%MKLBUILDERROOT%\makefile" ^ NMAKE /f "%MKLBUILDERROOT%\makefile" ^
libintel64 ^ libintel64 ^
export=functions.txt ^ export=functions.txt ^
threading=%%t ^ threading=%%t ^
name=!LIBBASENAME! ^ name=!LIBBASENAME! ^
MKLROOT="%MKLROOT%" MKLROOT="%MKLROOT%"
if errorlevel 1 ( if errorlevel 1 (
echo Error: NMAKE.exe for threading=%%t failed. echo Error: NMAKE.exe for threading=%%t failed.
exit /b 1 exit /b 1
) )
mkdir Publish\%CNTKCUSTOMMKLVERSION%\x64\%%t mkdir Publish\%CNTKCUSTOMMKLVERSION%\x64\%%t
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
move !LIBBASENAME!.dll Publish\%CNTKCUSTOMMKLVERSION%\x64\%%t move !LIBBASENAME!.dll Publish\%CNTKCUSTOMMKLVERSION%\x64\%%t
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
move !LIBBASENAME!.lib Publish\%CNTKCUSTOMMKLVERSION%\x64\%%t move !LIBBASENAME!.lib Publish\%CNTKCUSTOMMKLVERSION%\x64\%%t
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
del !LIBBASENAME!* del !LIBBASENAME!*
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
@REM TODO manifest? @REM TODO manifest?
) )
echo. echo.
echo Copying libiomp5md.dll. echo Copying libiomp5md.dll.
copy "%MKLROOT%\..\redist\intel64_win\compiler\libiomp5md.dll" Publish\%CNTKCUSTOMMKLVERSION%\x64\parallel copy "%MKLROOT%\..\redist\intel64_win\compiler\libiomp5md.dll" Publish\%CNTKCUSTOMMKLVERSION%\x64\parallel
if errorlevel 1 ( if errorlevel 1 (
exit /b 1 exit /b 1
) )
echo. echo.
echo Removing LIB directory. echo Removing LIB directory.
rmdir /s /q lib rmdir /s /q lib
if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1
echo. echo.
echo Copying include files to Publish\%CNTKCUSTOMMKLVERSION%\include. echo Copying include files to Publish\%CNTKCUSTOMMKLVERSION%\include.
mkdir Publish\%CNTKCUSTOMMKLVERSION%\include mkdir Publish\%CNTKCUSTOMMKLVERSION%\include
for /f %%h in (headers.txt) do ( for /f %%h in (headers.txt) do (
copy "%MKLROOT%\include\%%h" Publish\%CNTKCUSTOMMKLVERSION%\include copy "%MKLROOT%\include\%%h" Publish\%CNTKCUSTOMMKLVERSION%\include
if errorlevel 1 ( if errorlevel 1 (
echo Failed to copy "%MKLROOT%\include\%%h". echo Failed to copy "%MKLROOT%\include\%%h".
exit /b 1 exit /b 1
) )
) )
copy README-for-redistributable.txt Publish\%CNTKCUSTOMMKLVERSION%\README.txt copy README-for-redistributable.txt Publish\%CNTKCUSTOMMKLVERSION%\README.txt
if errorlevel 1 ( if errorlevel 1 (
echo Failed to copy README. echo Failed to copy README.
exit /b 1 exit /b 1
) )
copy ..\..\LICENSE.md Publish\%CNTKCUSTOMMKLVERSION% copy ..\..\LICENSE.md Publish\%CNTKCUSTOMMKLVERSION%
if errorlevel 1 ( if errorlevel 1 (
echo Failed to copy LICENSE.md. echo Failed to copy LICENSE.md.
exit /b 1 exit /b 1
) )
popd popd

Просмотреть файл

@ -1,169 +1,169 @@
FROM nvidia/cuda:7.5-cudnn5-devel FROM nvidia/cuda:7.5-cudnn5-devel
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
autotools-dev \ autotools-dev \
build-essential \ build-essential \
cmake \ cmake \
git \ git \
gfortran-multilib \ gfortran-multilib \
libavcodec-dev \ libavcodec-dev \
libavformat-dev \ libavformat-dev \
libjasper-dev \ libjasper-dev \
libjpeg-dev \ libjpeg-dev \
libpng-dev \ libpng-dev \
liblapacke-dev \ liblapacke-dev \
libswscale-dev \ libswscale-dev \
libtiff-dev \ libtiff-dev \
pkg-config \ pkg-config \
python-dev \ python-dev \
python-numpy \ python-numpy \
python-pip \ python-pip \
python-yaml \ python-yaml \
wget \ wget \
zlib1g-dev \ zlib1g-dev \
# Protobuf # Protobuf
ca-certificates \ ca-certificates \
curl \ curl \
unzip \ unzip \
# For Kaldi # For Kaldi
automake \ automake \
libtool \ libtool \
autoconf \ autoconf \
subversion \ subversion \
# For Kaldi's dependencies # For Kaldi's dependencies
libapr1 libaprutil1 libltdl-dev libltdl7 libserf-1-1 libsigsegv2 libsvn1 m4 && \ libapr1 libaprutil1 libltdl-dev libltdl7 libserf-1-1 libsigsegv2 libsvn1 m4 && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
RUN OPENMPI_VERSION=1.10.3 && \ RUN OPENMPI_VERSION=1.10.3 && \
wget -q -O - https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-${OPENMPI_VERSION}.tar.gz | tar -xzf - && \ wget -q -O - https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-${OPENMPI_VERSION}.tar.gz | tar -xzf - && \
cd openmpi-${OPENMPI_VERSION} && \ cd openmpi-${OPENMPI_VERSION} && \
./configure --prefix=/usr/local/mpi && \ ./configure --prefix=/usr/local/mpi && \
make -j"$(nproc)" install && \ make -j"$(nproc)" install && \
rm -rf /openmpi-${OPENMPI_VERSION} rm -rf /openmpi-${OPENMPI_VERSION}
ENV PATH /usr/local/mpi/bin:$PATH ENV PATH /usr/local/mpi/bin:$PATH
ENV LD_LIBRARY_PATH /usr/local/mpi/lib:$LD_LIBRARY_PATH ENV LD_LIBRARY_PATH /usr/local/mpi/lib:$LD_LIBRARY_PATH
RUN LIBZIP_VERSION=1.1.2 && \ RUN LIBZIP_VERSION=1.1.2 && \
wget -q -O - http://nih.at/libzip/libzip-${LIBZIP_VERSION}.tar.gz | tar -xzf - && \ wget -q -O - http://nih.at/libzip/libzip-${LIBZIP_VERSION}.tar.gz | tar -xzf - && \
cd libzip-${LIBZIP_VERSION} && \ cd libzip-${LIBZIP_VERSION} && \
./configure && \ ./configure && \
make -j"$(nproc)" install && \ make -j"$(nproc)" install && \
rm -rf /libzip-${LIBZIP_VERSION} rm -rf /libzip-${LIBZIP_VERSION}
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
RUN wget -q -O - https://github.com/NVlabs/cub/archive/1.4.1.tar.gz | tar -C /usr/local -xzf - RUN wget -q -O - https://github.com/NVlabs/cub/archive/1.4.1.tar.gz | tar -C /usr/local -xzf -
RUN OPENCV_VERSION=3.1.0 && \ RUN OPENCV_VERSION=3.1.0 && \
wget -q -O - https://github.com/Itseez/opencv/archive/${OPENCV_VERSION}.tar.gz | tar -xzf - && \ wget -q -O - https://github.com/Itseez/opencv/archive/${OPENCV_VERSION}.tar.gz | tar -xzf - && \
cd opencv-${OPENCV_VERSION} && \ cd opencv-${OPENCV_VERSION} && \
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local/opencv-${OPENCV_VERSION} . && \ cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local/opencv-${OPENCV_VERSION} . && \
make -j"$(nproc)" install && \ make -j"$(nproc)" install && \
rm -rf /opencv-${OPENCV_VERSION} rm -rf /opencv-${OPENCV_VERSION}
RUN OPENBLAS_VERSION=0.2.18 && \ RUN OPENBLAS_VERSION=0.2.18 && \
wget -q -O - https://github.com/xianyi/OpenBLAS/archive/v${OPENBLAS_VERSION}.tar.gz | tar -xzf - && \ wget -q -O - https://github.com/xianyi/OpenBLAS/archive/v${OPENBLAS_VERSION}.tar.gz | tar -xzf - && \
cd OpenBLAS-${OPENBLAS_VERSION} && \ cd OpenBLAS-${OPENBLAS_VERSION} && \
make -j"$(nproc)" USE_OPENMP=1 | tee make.log && \ make -j"$(nproc)" USE_OPENMP=1 | tee make.log && \
grep -qF 'OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)' make.log && \ grep -qF 'OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)' make.log && \
grep -qF 'Use OpenMP in the multithreading.' make.log && \ grep -qF 'Use OpenMP in the multithreading.' make.log && \
make PREFIX=/usr/local/openblas install && \ make PREFIX=/usr/local/openblas install && \
rm -rf /OpenBLAS-${OPENBLAS_VERSION} rm -rf /OpenBLAS-${OPENBLAS_VERSION}
ENV LD_LIBRARY_PATH /usr/local/openblas/lib:$LD_LIBRARY_PATH ENV LD_LIBRARY_PATH /usr/local/openblas/lib:$LD_LIBRARY_PATH
# Install Protobuf # Install Protobuf
RUN PROTOBUF_VERSION=3.1.0 \ RUN PROTOBUF_VERSION=3.1.0 \
PROTOBUF_STRING=protobuf-$PROTOBUF_VERSION && \ PROTOBUF_STRING=protobuf-$PROTOBUF_VERSION && \
wget -O - --no-verbose https://github.com/google/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz | tar -xzf - && \ wget -O - --no-verbose https://github.com/google/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz | tar -xzf - && \
cd $PROTOBUF_STRING && \ cd $PROTOBUF_STRING && \
./autogen.sh && \ ./autogen.sh && \
./configure CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-shared --prefix=/usr/local/$PROTOBUF_STRING && \ ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-shared --prefix=/usr/local/$PROTOBUF_STRING && \
make -j $(nproc) install && \ make -j $(nproc) install && \
cd .. && \ cd .. && \
rm -rf $PROTOBUF_STRING rm -rf $PROTOBUF_STRING
# Install Boost # Install Boost
RUN BOOST_VERSION=1_60_0 && \ RUN BOOST_VERSION=1_60_0 && \
BOOST_DOTTED_VERSION=$(echo $BOOST_VERSION | tr _ .) && \ BOOST_DOTTED_VERSION=$(echo $BOOST_VERSION | tr _ .) && \
wget -q -O - https://sourceforge.net/projects/boost/files/boost/${BOOST_DOTTED_VERSION}/boost_${BOOST_VERSION}.tar.gz/download | tar -xzf - && \ wget -q -O - https://sourceforge.net/projects/boost/files/boost/${BOOST_DOTTED_VERSION}/boost_${BOOST_VERSION}.tar.gz/download | tar -xzf - && \
cd boost_${BOOST_VERSION} && \ cd boost_${BOOST_VERSION} && \
./bootstrap.sh --prefix=/usr/local/boost-${BOOST_DOTTED_VERSION} --with-libraries=filesystem,system,test && \ ./bootstrap.sh --prefix=/usr/local/boost-${BOOST_DOTTED_VERSION} --with-libraries=filesystem,system,test && \
./b2 -d0 -j"$(nproc)" install && \ ./b2 -d0 -j"$(nproc)" install && \
rm -rf /boost_${BOOST_VERSION} rm -rf /boost_${BOOST_VERSION}
# Install CNTK custom MKL, version 2 # Install CNTK custom MKL, version 2
RUN mkdir /usr/local/CNTKCustomMKL && \ RUN mkdir /usr/local/CNTKCustomMKL && \
wget --no-verbose -O - https://www.cntk.ai/mkl/CNTKCustomMKL-Linux-2.tgz | \ wget --no-verbose -O - https://www.cntk.ai/mkl/CNTKCustomMKL-Linux-2.tgz | \
tar -xzf - -C /usr/local/CNTKCustomMKL tar -xzf - -C /usr/local/CNTKCustomMKL
RUN mkdir -p /usr/local/cudnn/cuda/include && \ RUN mkdir -p /usr/local/cudnn/cuda/include && \
ln -s /usr/include/cudnn.h /usr/local/cudnn/cuda/include/cudnn.h && \ ln -s /usr/include/cudnn.h /usr/local/cudnn/cuda/include/cudnn.h && \
mkdir -p /usr/local/cudnn/cuda/lib64 && \ mkdir -p /usr/local/cudnn/cuda/lib64 && \
ln -s /etc/alternatives/libcudnn_so /usr/local/cudnn/cuda/lib64/libcudnn.so ln -s /etc/alternatives/libcudnn_so /usr/local/cudnn/cuda/lib64/libcudnn.so
RUN pip install pytest sphinx-rtd-theme Pillow RUN pip install pytest sphinx-rtd-theme Pillow
ENV BLAS=/usr/local/openblas/lib/libopenblas.so ENV BLAS=/usr/local/openblas/lib/libopenblas.so
ENV LAPACK=/usr/local/openblas/lib/libopenblas.so ENV LAPACK=/usr/local/openblas/lib/libopenblas.so
RUN SCIPY_VERSION=0.18.0 && \ RUN SCIPY_VERSION=0.18.0 && \
wget -q -O - https://github.com/scipy/scipy/releases/download/v${SCIPY_VERSION}/scipy-${SCIPY_VERSION}.tar.gz | tar -zxf - && \ wget -q -O - https://github.com/scipy/scipy/releases/download/v${SCIPY_VERSION}/scipy-${SCIPY_VERSION}.tar.gz | tar -zxf - && \
cd scipy-${SCIPY_VERSION} && \ cd scipy-${SCIPY_VERSION} && \
python setup.py build && \ python setup.py build && \
python setup.py install && \ python setup.py install && \
cd .. && \ cd .. && \
rm -rf scipy-${SCIPY_VERSION} rm -rf scipy-${SCIPY_VERSION}
# Install Kaldi # Install Kaldi
ENV KALDI_VERSION=c024e8aa ENV KALDI_VERSION=c024e8aa
ENV KALDI_PATH /usr/local/kaldi-$KALDI_VERSION ENV KALDI_PATH /usr/local/kaldi-$KALDI_VERSION
RUN mv /bin/sh /bin/sh.orig && \ RUN mv /bin/sh /bin/sh.orig && \
ln -s -f /bin/bash /bin/sh && \ ln -s -f /bin/bash /bin/sh && \
mkdir $KALDI_PATH && \ mkdir $KALDI_PATH && \
wget --no-verbose -O - https://github.com/kaldi-asr/kaldi/archive/$KALDI_VERSION.tar.gz | tar -xzf - --strip-components=1 -C $KALDI_PATH && \ wget --no-verbose -O - https://github.com/kaldi-asr/kaldi/archive/$KALDI_VERSION.tar.gz | tar -xzf - --strip-components=1 -C $KALDI_PATH && \
cd $KALDI_PATH && \ cd $KALDI_PATH && \
cd tools && \ cd tools && \
perl -pi -e 's/^# (OPENFST_VERSION = 1.4.1)$/\1/' Makefile && \ perl -pi -e 's/^# (OPENFST_VERSION = 1.4.1)$/\1/' Makefile && \
./extras/check_dependencies.sh && \ ./extras/check_dependencies.sh && \
make -j $(nproc) all && \ make -j $(nproc) all && \
cd ../src && \ cd ../src && \
./configure --openblas-root=/usr/local/openblas --shared && \ ./configure --openblas-root=/usr/local/openblas --shared && \
make -j $(nproc) depend && \ make -j $(nproc) depend && \
make -j $(nproc) all && \ make -j $(nproc) all && \
# Remove some unneeded stuff in $KALDI_PATH to reduce size # Remove some unneeded stuff in $KALDI_PATH to reduce size
find $KALDI_PATH -name '*.o' -print0 | xargs -0 rm && \ find $KALDI_PATH -name '*.o' -print0 | xargs -0 rm && \
for dir in $KALDI_PATH/src/*bin; do make -C $dir clean; done && \ for dir in $KALDI_PATH/src/*bin; do make -C $dir clean; done && \
mv -f /bin/sh.orig /bin/sh mv -f /bin/sh.orig /bin/sh
WORKDIR /cntk WORKDIR /cntk
RUN git clone --depth=1 -b master https://github.com/Microsoft/CNTK.git . && \ RUN git clone --depth=1 -b master https://github.com/Microsoft/CNTK.git . && \
CONFIGURE_OPTS="\ CONFIGURE_OPTS="\
--with-cuda=/usr/local/cuda \ --with-cuda=/usr/local/cuda \
--with-gdk-include=/usr/local/cuda/include \ --with-gdk-include=/usr/local/cuda/include \
--with-gdk-nvml-lib=/usr/local/cuda/lib64/stubs \ --with-gdk-nvml-lib=/usr/local/cuda/lib64/stubs \
--with-kaldi=${KALDI_PATH} \ --with-kaldi=${KALDI_PATH} \
--with-cudnn=/usr/local/cudnn" && \ --with-cudnn=/usr/local/cudnn" && \
mkdir -p build/gpu/release && \ mkdir -p build/gpu/release && \
cd build/gpu/release && \ cd build/gpu/release && \
../../../configure $CONFIGURE_OPTS --with-openblas=/usr/local/openblas && \ ../../../configure $CONFIGURE_OPTS --with-openblas=/usr/local/openblas && \
make -j"$(nproc)" all && \ make -j"$(nproc)" all && \
cd ../../.. && \ cd ../../.. && \
mkdir -p build-mkl/gpu/release && \ mkdir -p build-mkl/gpu/release && \
cd build-mkl/gpu/release && \ cd build-mkl/gpu/release && \
../../../configure $CONFIGURE_OPTS --with-mkl=/usr/local/CNTKCustomMKL && \ ../../../configure $CONFIGURE_OPTS --with-mkl=/usr/local/CNTKCustomMKL && \
make -j"$(nproc)" all make -j"$(nproc)" all
RUN cd Examples/Image/DataSets/CIFAR-10 && \ RUN cd Examples/Image/DataSets/CIFAR-10 && \
python install_cifar10.py && \ python install_cifar10.py && \
cd ../../../.. cd ../../../..
RUN cd Examples/Image/DataSets/MNIST && \ RUN cd Examples/Image/DataSets/MNIST && \
python install_mnist.py && \ python install_mnist.py && \
cd ../../../.. cd ../../../..
ENV PATH=/cntk/build/gpu/release/bin:/usr/local/mpi/bin:$PATH ENV PATH=/cntk/build/gpu/release/bin:/usr/local/mpi/bin:$PATH

Просмотреть файл

@ -1,77 +1,77 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{19c9fbe6-fcf6-4300-988b-be7e64822b84}</ProjectGuid> <ProjectGuid>{19c9fbe6-fcf6-4300-988b-be7e64822b84}</ProjectGuid>
<ProjectHome /> <ProjectHome />
<StartupFile>cntk_py.py</StartupFile> <StartupFile>cntk_py.py</StartupFile>
<SearchPath /> <SearchPath />
<WorkingDirectory>.</WorkingDirectory> <WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath> <OutputPath>.</OutputPath>
<ProjectTypeGuids>{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids> <ProjectTypeGuids>{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids>
<LaunchProvider>Standard Python launcher</LaunchProvider> <LaunchProvider>Standard Python launcher</LaunchProvider>
<InterpreterId /> <InterpreterId />
<InterpreterVersion /> <InterpreterVersion />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'" /> <PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
<PropertyGroup Condition="'$(Configuration)' == 'Release'" /> <PropertyGroup Condition="'$(Configuration)' == 'Release'" />
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion> <VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
<PtvsTargetsFile>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets</PtvsTargetsFile> <PtvsTargetsFile>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets</PtvsTargetsFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="cntk_py.i" /> <Content Include="cntk_py.i" />
<Content Include="io\tests\tf_data.txt" /> <Content Include="io\tests\tf_data.txt" />
<Content Include="pytest.ini" /> <Content Include="pytest.ini" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="blocks.py" /> <Compile Include="blocks.py" />
<Compile Include="cntk_py.py" /> <Compile Include="cntk_py.py" />
<Compile Include="conftest.py" /> <Compile Include="conftest.py" />
<Compile Include="initializer.py" /> <Compile Include="initializer.py" />
<Compile Include="io\tests\io_tests.py" /> <Compile Include="io\tests\io_tests.py" />
<Compile Include="io\__init__.py" /> <Compile Include="io\__init__.py" />
<Compile Include="layers.py" /> <Compile Include="layers.py" />
<Compile Include="learner.py" /> <Compile Include="learner.py" />
<Compile Include="models.py" /> <Compile Include="models.py" />
<Compile Include="ops\functions.py" /> <Compile Include="ops\functions.py" />
<Compile Include="ops\sequence\__init__.py" /> <Compile Include="ops\sequence\__init__.py" />
<Compile Include="ops\tests\comparison_test.py" /> <Compile Include="ops\tests\comparison_test.py" />
<Compile Include="ops\tests\evaluation_test.py" /> <Compile Include="ops\tests\evaluation_test.py" />
<Compile Include="ops\tests\linear_test.py" /> <Compile Include="ops\tests\linear_test.py" />
<Compile Include="ops\tests\non_diff_test.py" /> <Compile Include="ops\tests\non_diff_test.py" />
<Compile Include="ops\tests\non_linear_test.py" /> <Compile Include="ops\tests\non_linear_test.py" />
<Compile Include="ops\tests\ops_test_utils.py" /> <Compile Include="ops\tests\ops_test_utils.py" />
<Compile Include="ops\tests\reshaping_test.py" /> <Compile Include="ops\tests\reshaping_test.py" />
<Compile Include="ops\tests\__init__.py" /> <Compile Include="ops\tests\__init__.py" />
<Compile Include="ops\variables.py" /> <Compile Include="ops\variables.py" />
<Compile Include="ops\__init__.py" /> <Compile Include="ops\__init__.py" />
<Compile Include="tensor.py" /> <Compile Include="tensor.py" />
<Compile Include="tests\initializer_test.py" /> <Compile Include="tests\initializer_test.py" />
<Compile Include="tests\learner_test.py" /> <Compile Include="tests\learner_test.py" />
<Compile Include="tests\tensor_test.py" /> <Compile Include="tests\tensor_test.py" />
<Compile Include="tests\test_utils.py" /> <Compile Include="tests\test_utils.py" />
<Compile Include="tests\__init__.py" /> <Compile Include="tests\__init__.py" />
<Compile Include="trainer.py" /> <Compile Include="trainer.py" />
<Compile Include="utils\debughelpers\__init__.py" /> <Compile Include="utils\debughelpers\__init__.py" />
<Compile Include="utils\persist.py" /> <Compile Include="utils\persist.py" />
<Compile Include="utils\tests\persist_test.py" /> <Compile Include="utils\tests\persist_test.py" />
<Compile Include="utils\tests\utils_test.py" /> <Compile Include="utils\tests\utils_test.py" />
<Compile Include="utils\__init__.py" /> <Compile Include="utils\__init__.py" />
<Compile Include="__init__.py" /> <Compile Include="__init__.py" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="io" /> <Folder Include="io" />
<Folder Include="io\tests" /> <Folder Include="io\tests" />
<Folder Include="ops" /> <Folder Include="ops" />
<Folder Include="ops\sequence" /> <Folder Include="ops\sequence" />
<Folder Include="ops\tests" /> <Folder Include="ops\tests" />
<Folder Include="tests" /> <Folder Include="tests" />
<Folder Include="utils" /> <Folder Include="utils" />
<Folder Include="utils\debughelpers" /> <Folder Include="utils\debughelpers" />
<Folder Include="utils\tests" /> <Folder Include="utils\tests" />
</ItemGroup> </ItemGroup>
<Import Project="$(PtvsTargetsFile)" Condition="Exists($(PtvsTargetsFile))" /> <Import Project="$(PtvsTargetsFile)" Condition="Exists($(PtvsTargetsFile))" />
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="!Exists($(PtvsTargetsFile))" /> <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="!Exists($(PtvsTargetsFile))" />
</Project> </Project>

Просмотреть файл

@ -1,69 +1,69 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1a078fc2-21c0-4f42-9a5b-0e84e944bc74}</ProjectGuid> <ProjectGuid>{1a078fc2-21c0-4f42-9a5b-0e84e944bc74}</ProjectGuid>
<ProjectHome /> <ProjectHome />
<StartupFile>test\language_understanding_test.py</StartupFile> <StartupFile>test\language_understanding_test.py</StartupFile>
<SearchPath>$(RepoRootPath)$(Platform)\$(Configuration);$(RepoRootPath)bindings\python;$(RepoRootPath)bindings\python\examples</SearchPath> <SearchPath>$(RepoRootPath)$(Platform)\$(Configuration);$(RepoRootPath)bindings\python;$(RepoRootPath)bindings\python\examples</SearchPath>
<WorkingDirectory>.</WorkingDirectory> <WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath> <OutputPath>.</OutputPath>
<ProjectTypeGuids>{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids> <ProjectTypeGuids>{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids>
<LaunchProvider>Standard Python launcher</LaunchProvider> <LaunchProvider>Standard Python launcher</LaunchProvider>
<InterpreterId>{51b3a70c-2ea2-4fe4-aeba-ff2cea35103f}</InterpreterId> <InterpreterId>{51b3a70c-2ea2-4fe4-aeba-ff2cea35103f}</InterpreterId>
<InterpreterVersion>3.4</InterpreterVersion> <InterpreterVersion>3.4</InterpreterVersion>
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging> <EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
<IsWindowsApplication>False</IsWindowsApplication> <IsWindowsApplication>False</IsWindowsApplication>
<Environment>PYTHONPATH=$(SolutionDir)bindings\python;$(SolutionDir)bindings\python\examples</Environment> <Environment>PYTHONPATH=$(SolutionDir)bindings\python;$(SolutionDir)bindings\python\examples</Environment>
<InterpreterPath> <InterpreterPath>
</InterpreterPath> </InterpreterPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'" /> <PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
<PropertyGroup Condition="'$(Configuration)' == 'Release'" /> <PropertyGroup Condition="'$(Configuration)' == 'Release'" />
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion> <VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion>
<PtvsTargetsFile>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets</PtvsTargetsFile> <PtvsTargetsFile>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets</PtvsTargetsFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release_NoOpt' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release_NoOpt' ">
<OutputPath>bin\Release_NoOpt\</OutputPath> <OutputPath>bin\Release_NoOpt\</OutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CifarConvNet\CifarConvNet.py" /> <Compile Include="CifarConvNet\CifarConvNet.py" />
<Compile Include="CifarResNet\CifarResNet.py" /> <Compile Include="CifarResNet\CifarResNet.py" />
<Compile Include="common\layers.py"> <Compile Include="common\layers.py">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="common\nn.py" /> <Compile Include="common\nn.py" />
<Compile Include="common\__init__.py" /> <Compile Include="common\__init__.py" />
<Compile Include="LanguageUnderstanding\LanguageUnderstanding.py" /> <Compile Include="LanguageUnderstanding\LanguageUnderstanding.py" />
<Compile Include="MNIST\SimpleMNIST.py" /> <Compile Include="MNIST\SimpleMNIST.py" />
<Compile Include="NumpyInterop\FeedForwardNet.py" /> <Compile Include="NumpyInterop\FeedForwardNet.py" />
<Compile Include="Sequence2Sequence\Sequence2Sequence.py" /> <Compile Include="Sequence2Sequence\Sequence2Sequence.py" />
<Compile Include="SequenceClassification\SequenceClassification.py" /> <Compile Include="SequenceClassification\SequenceClassification.py" />
<Compile Include="test\cifar_resnet_test.py" /> <Compile Include="test\cifar_resnet_test.py" />
<Compile Include="test\cifar_convnet_test.py" /> <Compile Include="test\cifar_convnet_test.py" />
<Compile Include="test\feed_forward_net_test.py" /> <Compile Include="test\feed_forward_net_test.py" />
<Compile Include="test\language_understanding_test.py" /> <Compile Include="test\language_understanding_test.py" />
<Compile Include="test\sequence_classification_test.py" /> <Compile Include="test\sequence_classification_test.py" />
<Compile Include="test\sequence_to_sequence_test.py" /> <Compile Include="test\sequence_to_sequence_test.py" />
<Compile Include="test\simple_mnist_test.py" /> <Compile Include="test\simple_mnist_test.py" />
<Compile Include="__init__.py" /> <Compile Include="__init__.py" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="CifarConvNet\" /> <Folder Include="CifarConvNet\" />
<Folder Include="CifarResNet" /> <Folder Include="CifarResNet" />
<Folder Include="common" /> <Folder Include="common" />
<Folder Include="LanguageUnderstanding\" /> <Folder Include="LanguageUnderstanding\" />
<Folder Include="MNIST" /> <Folder Include="MNIST" />
<Folder Include="NumpyInterop" /> <Folder Include="NumpyInterop" />
<Folder Include="Sequence2Sequence" /> <Folder Include="Sequence2Sequence" />
<Folder Include="SequenceClassification" /> <Folder Include="SequenceClassification" />
<Folder Include="test\" /> <Folder Include="test\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<InterpreterReference Include="{51b3a70c-2ea2-4fe4-aeba-ff2cea35103f}\3.4" /> <InterpreterReference Include="{51b3a70c-2ea2-4fe4-aeba-ff2cea35103f}\3.4" />
</ItemGroup> </ItemGroup>
<Import Project="$(PtvsTargetsFile)" Condition="Exists($(PtvsTargetsFile))" /> <Import Project="$(PtvsTargetsFile)" Condition="Exists($(PtvsTargetsFile))" />
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="!Exists($(PtvsTargetsFile))" /> <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="!Exists($(PtvsTargetsFile))" />
</Project> </Project>