Kibeom Kim
Kibeom Kim

Reputation: 481

Running cloud datalab kernel on my own server?

How can I run cloud datalab kernel on my own server?

I skimmed the source and I thought I should use https://github.com/googledatalab/datalab/tree/master/containers/gateway docker image and also modify https://github.com/googledatalab/datalab/blob/master/containers/datalab/content/run.sh script but wasn't too sure.

Upvotes: 1

Views: 153

Answers (1)

Omar Jarjur
Omar Jarjur

Reputation: 1066

You should be able to do this with the existing images as is, but it's a bit complicated, as you have to setup a connection from your server to inside the Datalab container:

  1. On your server, run the "gcr.io/cloud-datalab/datalab-gateway:latest" image.

    docker run -it -p 127.0.0.1:8082:8080 gcr.io/cloud-datalab/datalab-gateway:latest

  2. On your local machine (e.g. your laptop), use ip addr show docker0 to look up the gateway IP address used to communicate between docker containers. On my machine this is 172.17.0.1, but yours will probably be different.

  3. Use SSH to set up port forwarding from your server to the docker gateway IP address.

    ssh -fNL <gateway_ip>:8082:localhost:8082

  4. Start the datalab UI pointed at the kernel gateway:

    docker run -it -p 127.0.0.1:8081:8080 -v "${HOME}:/content" -e "KG_URL=http://<gateway_ip>:8082" gcr.io/cloud-datalab/datalab:local

Upvotes: 2

Related Questions