Run microsoft/cntk on MacOS | Microsoft: DAT236x

Thu Sep 13 2018

During the edX Microsoft: DAT236x on Deep Learning Explained I came across an issue where I couldn’t run Microsoft Cognitive Toolkit on a Mac natively. Looks like there is a docker container that can help us do that.

So the steps to run the library are the following:

    1. Install docker and pull the microsoft/cntk image
      docker pull microsoft/cntk:2.0-cpu-python3.5
    2. Download the course material to a folder named “course” or any other folder you like
      https://github.com/MicrosoftLearning/Deep-Learning-Explained
    3. Then from your terminal run
      docker run -d -p 8888:8888 --name cntk_container1 -ti -v THE_PATH_TO_THE_COURSE_DIR/course:/course microsoft/cntk bash

      This will load the container.

    4. From a new terminal window run
      docker exec -it cntk_container1 bash -c "source /cntk/activate-cntk && jupyter-notebook --no-browser --port=8888 --ip=0.0.0.0 --notebook-dir=/course --allow-root"

And now you are running jupyter with the necessary libraries. When you visit http://0.0.0.0:8888/ you can run all of the course’s material.

Full Stack Weekly Newsletter

A free weekly newsletter for full stack web developers!