Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Build and Run

RNabel edited this page Aug 25, 2015 · 22 revisions

This page outlines the steps to build the sources and run DataLab locally. As a starting point, make sure you have a fully initialized environment.

Building

Building the Sources

The first step is to build the individual components in the sources directory.

 cd sources
 ./build.sh

This should produce build outputs into the build directory at the root of the repository.

Building the Container

The next step is to package those build outputs into a docker container. As an attempt to optimize the build process, first pull the last known good build of the previously deployed container.

cd $REPO_DIR/containers/datalab
sudo docker pull gcr.io/cloud_datalab/datalab:latest
./build.sh

Running

You can run the docker container locally.

cd $REPO_DIR/containers/datalab
./run.sh [shell]

Then connect to http://127.0.0.1:8081/ from your browser.

The optional shell flag causes the container to start, but stop at the command prompt inside the container, i.e. not start the DataLab server automatically. From within the shell, you can inspect the docker container content, manually start/stop DataLab without killing the running the container instance. This allows making tactical changes within the built container and re-running.

Testing

We only have very little testing of python code, and is a big hole (that needs addressing).

cd $REPO_DIR/sources
./test.sh

Testing DataLab itself requires running and manually testing the product... specifically opening the sample notebooks and re-running them to ensure things work.

Troubleshooting

  • If you get 'connection refused' when connecting to http://127.0.0.1:8081/ on a Mac, make sure you have the necessary port forwarding rule in your VirtualBox settings for boot2docker-vm. Go to Applications - VirtualBox, select the boo2docker-vm, click Settings - Network - Port Forwarding, and make sure you have a rule to forward TCP port 8081 on Host IP 127.0.0.1 to guest port 8081. You may need to logout/login for the changes to take full effect.

  • If a timeout occurs when pulling an image in the build process, run: boot2docker stop

    boot2docker delete

    boot2docker init

    boot2docker up

Clone this wiki locally