Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to install CNTK on a macbook?

It is possible to install Microsoft CNTK on a macbook? I have OS X El Capitan. The official Microsoft documentation at https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-your-machine doesn't provide any information for mac users.

Thank you

like image 516
Victor Avatar asked Jan 17 '17 19:01

Victor


2 Answers

As of June 2017, you can only run CNTK on OSX using Docker (which will run a Linux container)

Documentation from Microsoft is available here: https://docs.microsoft.com/en-us/cognitive-toolkit/CNTK-Docker-Containers

If you want to run the CPU version of CNTK (as opposed to a GPU enabled) you'll need to pull a particular version of the docker container. See: https://hub.docker.com/r/microsoft/cntk/

I recommend using the following for CPU CNTK:

docker pull microsoft/cntk:2.0-cpu-python3.5

Once you've pulled the container above, you can use Jupyter Notebooks to look at tutorials etc:

First, run the container:

docker run -d -p 8888:8888 --name cntk-jupyter-notebooks -t microsoft/cntk:2.0-cpu-python3.5

Then run this command:

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"

You'll want to access the shell to run CNTK commands. You can attach a bash shell using docker.

Get your container id

docker ps

Then attach a shell

docker exec -it <container_id> bash
like image 140
Rian Finnegan Avatar answered Nov 16 '22 01:11

Rian Finnegan


While it might not be supported on Mac directly, you can always use a virtual machine to get around.

  1. You can setup docker in your local environment.

    https://docs.docker.com/docker-for-mac/

  2. Follow its documentations on how to install on Docker

    https://github.com/Microsoft/CNTK/wiki/CNTK-Docker-Containers

like image 33
Edmund Lee Avatar answered Nov 16 '22 01:11

Edmund Lee