Martin Görner Profile picture
Product Manager for Keras and Tensorflow high-level APIs. Previously worked on Cloud TPUs (Tensor Processing Units). Passionate about democratizing ML.

Sep 13, 2018, 7 tweets

Google Cloud Platform now has preconfigured deep learning images with Tensorflow, PyTorch, Jupyter, Cuda and CuDNN already installed. It took me some time to figure out how to start Jupyter on such an instance. Turns out it's a one liner:

Detailed instructions:
1) Go to cloud.google.com/console and create an instance (pick the Tensorflow deep learning image and a powerful GPU)

2) Ssh into your instance using the "gcloud compute ssh" command in the pic (there will be additional install prompts to accept and a reboot on the first connection. Relaunch the command after that to reconnect). Replace PROJECT_NAME and INSTANCE_NAME with your own values.

3) You are now SSH'ed into your instance. Type "jupyter notebook". Jupyter starts and gives you a URL. Copy-paste it into your browser. That's it. The -L param in the SSH command sets up ssh tunnelling from localhost:8888 on your laptop to localhost:8888 on your instance.

Once again in copy-paste friendly text:
gcloud compute --project "PROJECT_NAME" ssh "INSTANCE_NAME" -- -L 8888:localhost:8888

Oh, and Jupyter lab is already running on port 8080 whenever a deep learning instance boots. You don't even need to start it. If you are into Jupyter Lab, start the instance and ssh right in:
gcloud compute ssh "INSTANCE_NAME" -- -L 8080:localhost:8080

It also works with multiple ports. You want jupyter notebooks (8888) and tensorboard (6006) ? No problem:

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling