<commit_before># How to setup a Mac host for OpenWhisk

One way to develop or deploy OpenWhisk on a Mac is to use [docker-machine](https://docs.docker.com/machine/install-machine/) which runs the Docker daemon inside a virtual machine accessible from the Mac host.

# Prerequisites

The following are required to build and deploy OpenWhisk from a Mac host:

- [Oracle VM VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- [Docker 1.9.1+](https://docs.docker.com/engine/installation/mac/) (including `docker-machine`)
- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- [Scala 2.11](http://scala-lang.org/download/)
- [Ant](http://ant.apache.org/manual/install.html)
- [Ant-Contrib Tasks](http://ant-contrib.sourceforge.net/)
- [Gradle](https://docs.gradle.org/current/userguide/installation.html)

[Homebrew](http://brew.sh/) is an easy way to install all of these and prepare your Mac to build and deploy OpenWhik. The following shell command is provided for your convenience to install `brew` with [Cask](https://github.com/caskroom/homebrew-cask) and bootstraps these to complete the setup. Copy the entire section below and paste it into your terminal to run it.

```
echo '
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install cask
brew tap caskroom/cask
# install virtualbox
brew cask install virtualbox
# install docker 1.10
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e010e91a6bb5ad6697fb158017b36f575bbe644f/Formula/docker.rb
# install docker-machine
brew install docker-machine
# install java 8, scala
brew cask install java
brew install scala
# install ant and gradle
brew install ant
brew install ant-contrib
brew install gradle
# the following is required for running tests
sudo -H pip install jsonschema' | bash
```

# Create and configure Docker machine

It is recommended that you create a virtual machine `whisk` with at least 4GB of RAM.

```
docker-machine create -d virtualbox \<commit_msg>Updating Mac instructions to install docker 1.9.1 locally (consistent with the docker-machine setup)<commit_after># How to setup a Mac host for OpenWhisk

One way to develop or deploy OpenWhisk on a Mac is to use [docker-machine](https://docs.docker.com/machine/install-machine/) which runs the Docker daemon inside a virtual machine accessible from the Mac host.

# Prerequisites

The following are required to build and deploy OpenWhisk from a Mac host:

- [Oracle VM VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- [Docker 1.9.1+](https://docs.docker.com/engine/installation/mac/) (including `docker-machine`)
- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- [Scala 2.11](http://scala-lang.org/download/)
- [Ant](http://ant.apache.org/manual/install.html)
- [Ant-Contrib Tasks](http://ant-contrib.sourceforge.net/)
- [Gradle](https://docs.gradle.org/current/userguide/installation.html)

[Homebrew](http://brew.sh/) is an easy way to install all of these and prepare your Mac to build and deploy OpenWhik. The following shell command is provided for your convenience to install `brew` with [Cask](https://github.com/caskroom/homebrew-cask) and bootstraps these to complete the setup. Copy the entire section below and paste it into your terminal to run it.

```
echo '
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install cask
brew tap caskroom/cask
# install virtualbox
brew cask install virtualbox
# install docker 1.9.1
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7702619bb7c1a42dc1ed83a57128727a1a1f5d9f/Formula/docker.rb
# install docker-machine
brew install docker-machine
# install java 8, scala
brew cask install java
brew install scala
# install ant and gradle
brew install ant
brew install ant-contrib
brew install gradle
# the following is required for running tests
sudo -H pip install jsonschema' | bash
```

# Create and configure Docker machine

It is recommended that you create a virtual machine `whisk` with at least 4GB of RAM.

```
docker-machine create -d virtualbox \
{'fraction_non_alphanumeric': 0.10382775119617225, 'fraction_numerical': 0.018660287081339714, 'mean_word_length': 4.627187079407806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3268701', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1241, 'n_words': 436}