Is it possible to install CNTK on a macbook?
Asked Answered
M

4

15

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

Miun answered 17/1, 2017 at 19:46 Comment(0)
S
12

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://learn.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
Sensitivity answered 29/6, 2017 at 2:56 Comment(1)
Can the GPU version be used on a Mac, either through a local Windows VM/docker or would it require a eGPU?Jeffrey
M
3

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

Mackenie answered 17/1, 2017 at 20:2 Comment(2)
Docker is the way to go (at the moment). We've successfully used Docker for Mac users in CNTK tutorials, no issues reported.Contrive
The Docker image just got an update to the latest version, 2.0 beta 8, on DockerhubContrive
R
2

We currently support both Linux and Windows. Mac support is on our ToDo or would be interested in community contribution.

Reck answered 17/1, 2017 at 19:51 Comment(0)
P
0

I'm currently building CNTK on a linux machine without root access, installing every dependency with linuxbrew (a fork of homebrew). So I think is possible to build on MacOS natively. You can try building it from source with CNTK linux manual to build from source. Let me know if you have any issue.

Paisano answered 16/12, 2018 at 7:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.