Skip to content

Installation on Mac (Docker)

Alex Lubbock edited this page Sep 28, 2015 · 2 revisions

This guide shows how to install PySB on Mac using Docker.

Step 1: Install Docker

Follow the Mac installation instructions for Docker. Please check that the Docker "Hello World" program runs before continuing with this guide.

Step 2: Start Docker

Open a terminal (under Applications/Utilities, or use Spotlight to search for 'terminal').

Create a new boot2docker virtual machine (environment):

boot2docker init

Start the new virtual machine:

boot2docker start

Set up the docker command:

eval "$(boot2docker shellinit)"

Check the docker command now works:

docker version

Further assistance is available on the Docker documentation.

Step 3: Load the Docker image

You can install the PySB Docker container using the following command:

docker pull lolab/pysb

Step 4: Start the image

Replace the pathname after -v with the path on your laptop where you want to store your PySB models and related code. You can change the password in the quotation marks to a custom setting if you like.

docker run -d -p 443:8888 -e "PASSWORD=MyPassword" \
  -v /Users/alex/Desktop/notebooks:/notebooks --name pysb1 lolab/pysb

Step 5: Open a web browser

Enter the following on the command line to open your web browser to the correct location:

open https://`boot2docker ip`