-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Recommended CNTK 2.0 Setup
You can install CNTK with in three different ways on Windows and Linux :
-
Binary install with prepackaged scripts (Recommended): This provides the fastest way to get started with CNTK and applicable to most practitioners. See the steps below.
-
Binary install with manual steps: Only for those who need highly customized installations.
-
Build from sources (for developers): Those interested in contributing to CNTK.
[Note: The CNTK v2 APIs are an alpha release for early users to try and provide feedback on the usability and functional aspects of the API.]
Language Support:
CNTK V2 provides Python and C++ APIs. These APIs enables programmatically defining CNTK models and drive their training/evaluation, using either built-in data readers or user supplied data in native Python numpy/C++ arrays.
-
Python:
- CNTK V2 with Python APIs is supported natively on Windows with Python 3.4.4 and on Linux with Python 3.5. For both the platforms one can create a 3.4.4 python environment within any Anaconda (Python 2.7 or 3.x version).
-
Brainscript:
- CNTK V2 also supports the BrainScript framework.
There are two steps in CNTK V2 binary installation:
Step 1: Prerequisites installation
Step 2: Python (Anaconda environment) installation and CNTK V2 binary package installation
Step 3: Clone from Github examples and tutorials
Please follow the links for:
Please follow the steps below to install the binaries. The script will additionally clone the CNTK repository into C:\repos\cntk
.
Step 1: Prepare to run PowerShell scripts:
- Downloaded the scripts from here. Unzip/extract in a local folder say
C:\scripts
. One can create the director by executingmkdir C:\scripts
from a Windows command prompt. - Open PowerShell with administrator priviledges
- Click on Windows Start
- Search for Windows PowerShell (see below), Right click on the icon and select Run as administrator
- Type and run:
set-executionpolicy -executionpolicy unrestricted
. Upon being prompted, select A
- Close the PowerShell window
- Start a new Windows PowerShell application similar to previous step (not in Administrator mode )
Step 2: Run PowerShell scripts
- Run:
cd [Path to your unzipped PS scripts]
- Choose a wheel file appropriate for your machine:
- CPU: https://cntk.ai/pippackages/cpu/cntk-2.0a4-cp34-cp34m-win_amd64.whl
- GPU: https://cntk.ai/pippackages/gpu/cntk-2.0a4-cp34-cp34m-win_amd64.whl
- Run:
.\install.ps1 -Execute -cntkWhl [Location of the Whl file]
Step 3: Run Python setup
Open a windows command window or an anaconda command window
-
Run:
[Anaconda install folder root]\Scripts\activate cntk-py34
-
If you want to deploy a new CNTK wheel package at a later time simply re-run:
-
Run:
pip install –upgrade [Location of the wheel file]
Please follow the steps below to install the binaries. The script will additionally clone the CNTK repository into /home/[USERNAME]/repos/cntk
. Note: we have tested the script on Ubuntu 16.0.4. We first summarize what the script installs for you and sets the environment variables.
Step 1: Prepare to run scripts:
- Downloaded the scripts from here. Create a directory under
/home/[USERNAME]
and unzip the scripts in that folder.
Step 2: Run the bash scripts:
- Choose a wheel file appropriate for your machine:
- CPU: https://cntk.ai/pippackages/cpu/cntk-2.0a4-cp34-cp34m-linux_x86_64.whl
- GPU: https://cntk.ai/pippackages/gpu/cntk-2.0a4-cp34-cp34m-linux_x86_64.whl
Run: bash pycntkv2_linux_install.sh <url-of-wheel>
Step 3: Python updates
-
RUN:
source $HOME/anaconda3/bin/activate $HOME/anaconda3/envs/cntk-py34
to activate the python environment after the environment updates are completed. -
If you want to deploy a new CNTK wheel package at a later time simply re-run:
pip install –upgrade [Whl file location]
The script installs a CNTK Python 3.4 environment with Anaconda 4.1.1 located at $HOME/anaconda3/envs/cntk-py34
with all packages required for CNTK v2 Python and notebooks.