Which Google Cloud Platform service is the easiest for running Tensorflow?

后端 未结 6 584
一个人的身影
一个人的身影 2020-12-13 03:06

While working on Udacity Deep Learning assignments, I encountered memory problem. I need to switch to a cloud platform. I worked with AWS EC2 before but now I would like to

6条回答
  •  醉话见心
    2020-12-13 03:25

    Summing up the answers:

    • AI Platform Notebooks - One click Jupyter Lab environment
    • Deep Learning VMs images - Raw VMs with ML libraries pre-installed
    • Deep Learning Container Images - Containerized versions of the DLVM images
    • Cloud ML
    • Manual installation on Compute Engine. See instructions below.

    Instructions to manually run TensorFlow on Compute Engine:

    1. Create a project
    2. Open the Cloud Shell (a button at the top)
    3. List machine types: gcloud compute machine-types list. You can change the machine type I used in the next command.
    4. Create an instance:
    gcloud compute instances create tf \
      --image container-vm \
      --zone europe-west1-c \
      --machine-type n1-standard-2
    
    1. Run sudo docker run -d -p 8888:8888 --name tf b.gcr.io/tensorflow-udacity/assignments:0.5.0 (change the image name to the desired one)
    2. Find your instance in the dashboard and edit default network.
    3. Add a firewall rule to allow your IP as well as protocol and port tcp:8888.
    4. Find the External IP of the instance from the dashboard. Open IP:8888 on your browser. Done!
    5. When you are finished, delete the created cluster to avoid charges.

    This is how I did it and it worked. I am sure there is an easier way to do it.

    More Resources

    You might be interested to learn more about:

    • Google Cloud Shell
    • Container-Optimized Google Compute Engine Images
    • Google Cloud SDK for a more responsive shell and more.

    Good to know

    • "The contents of your Cloud Shell home directory persist across projects between all Cloud Shell sessions, even after the virtual machine terminates and is restarted"
    • To list all available image versions: gcloud compute images list --project google-containers

    Thanks to @user728291, @MattW, @CJCullen, and @zain-rizvi

提交回复
热议问题