Reputation: 481
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
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:
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
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.
Use SSH to set up port forwarding from your server to the docker gateway IP address.
ssh -fNL <gateway_ip>:8082:localhost:8082
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