How to Run CPU CNTK on Mac with Docker
Posted on Jul 16, 2018 in Tutorial • 10 min read
How to Run CPU CNTK on Mac with Docker¶
- Pull a particular version of the docker container of CPU CNTK. See https://hub.docker.com/r/microsoft/cntk/
docker pull microsoft/cntk:2.0-cpu-python3.5
- Run the conainer through Docker
docker run -d -p 8888:8888 --name cntk-jupyter-notebooks -t microsoft/cntk:2.0-cpu-python3.5
- Use jupyter notebooks to access tutorials
docker exec -it cntk-jupyter-notebooks bash -c "source /cntk/activate-cntk && jupyter-notebook --no-browser --port=8888 --ip=0.0.0.0 --notebook-dir=/cntk/Tutorials --allow-root"
- Access the shell to run CNTK commands by attaching a bash shell using docker
- get container id
docker ps
- attach a shell
docker exec -it <container_id> bash
- get container id
Repeat step 4 when using new terminal window
What is CNTK¶
The Microsoft Cognitive Toolkit is a unified deep learning toolkit that describes neural networks as a series of computational steps via a directed graph. In this directed graph, leaf nodes represent input values or network parameters, while other nodes represent matrix operations upon their inputs. CNTK allows users to easily realize and combine popular model types such as feed-forward DNNs, convolutional nets (CNNs), and recurrent networks (RNNs/LSTMs). It implements stochastic gradient descent learning with automatic differentiation and parallelization across multiple GPUs and servers.
CNTK Github