Wiki

Clone wiki

WONKA / Using Docker to run WONKA on MacOSX

We've taken the time to make a Docker image of the WONKA set up. This gives you a fully functioning dev environment with no requirement to install any of the dependencies

#If using Windows or MacOSX

Install Kitematic -> It is still a beta product. I found that running this while being on a VPN caused it not to work. Rebooting and taking myself off the VPN fixed the issue.

Now start up Kitematic!

path4211.png

This will open up a terminal window - in which you can use Docker. I missed this the first time round and thought the button was doing nothing. It will open a bash shell.

Screen Shot 2015-08-11 at 17.49.34.png

Pull down WONKA. This is about 2GB -> so it will take a while!

Type:

#!bash
docker pull abradle/wonka
Screen Shot 2015-08-11 at 17.49.53.png

Fire up the server

# Now we can get a server running - in this case on localhost off port 8080
docker run -d -p 8080:8000 -e "SERVER_NAME=localhost" -e "SERVER_PORT=8000" --name wonka_server abradle/wonka 

Now if you go back to Kitematic you should see this container (wonka_server, top left of screen).

Clicking on it should load something like what you see below. The STDOUT from the container is in the middle (this is the server log) and in the top right is the preview of the web page. You can view the web-page itself using the button on the top right of the web-preview. This is a fully functioning version of WONKA - you are just serving it locally off your Mac/Windows computer. me.png

Now if you go back to the terminal (the one you accessed before to start the server), you can enter the WONKA environment

docker exec -it wonka_server /bin/bash

Now you can access commands.

For example let's do a git pull - to make sure we're fully up to date with the code

# Move to the directory the code is in
cd CHOC
# Now do a pull
git pull

This will look something like this:

Screen Shot 2015-08-14 at 10.22.36.png

OR it will have updated your code to the latest version.

Now let's load in an example dataset

# Move to the directory where the processing happens
cd /CHOC/src/WebApp
python manage.py --wonka True --datasite CSV --csv_path WONKA_DATA/LOAD.csv --targ TRIAL
Don't worry about warnings here. You will be able to see the target you've loaded in the web-page.

It should look something like this:

Screen Shot 2015-08-27 at 13.53.25.png

Finally we can copy files from our host system.

Type:

pwd
to see where you are mounted

It should be something like /Users/abradley/CHOC

This is the mounted drive in your filesystem. So if you want to load PDB files, place them forward of /Users/abradley (in this case) and WONKA will be able to see them. Or you can copy them across.

Updated