哪种Google云端平台服务最容易运行Tensorflow? [英] Which Google Cloud Platform service is the easiest for running Tensorflow?

本文介绍了哪种Google云端平台服务最容易运行Tensorflow?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在研究Udacity深度学习任务时,我遇到了内存问题。我需要切换到云平台。我曾与AWS EC2合作过,但现在我想尝试Google Cloud Platform(GCP)。我将需要至少8GB内存。


  1. 是否有任何现成的解决方案可以在GCP上运行Tensorflow?

  2. 如果不是,哪个服务(计算引擎或容器引擎)会让开始更容易?

  3. / LI>

    解决方案

    总结的答案:





    在计算引擎上运行TensorFlow的逐步说明:




    1. 创建项目

    2. 打开云端Shell (顶部的按钮)
    3. >
    4. 列出机器类型: gcloud compute machine-types list 。您可以更改我在下一个命令中使用的计算机类型。

    5. 创建实例:





      gcloud计算实例创建tf \ 
    --image container-vm \
    --zone europe-west1-c \\ \\
    --machine-type n1-standard-2




    1. 运行 sudo docker run -d -p 8888:8888 --name tf b.gcr.io/tensorflow-udacity/assignments:0.5.0 (将图像名称更改为所需图像名称)

    2. dashboard 并编辑 default network。

    3. 添加防火墙规则以允许您的IP以及协议和端口 tcp:8888

    4. 从仪表板找到实例的外部IP。在浏览器上打开 IP:8888 。完成!

    5. 完成后,请删除创建的群集以避免收费。 我是如何做到的,它的工作原理。我相信有一个更简单的方法来做到这一点。



      更多资源



      您可能有兴趣了解更多关于:



      相关提示




      • 即使在虚拟机终止并重新启动之后,您的云端Shell主目录的内容仍然保留在所有云端Shell会话之间的项目之间

      • 列出所有可用的图像版本: gcloud compute images list --project google-containers



      感谢@ user728291,@MattW。和@CJCullen。


      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 try Google Cloud Platform (GCP). I will need at least 8GB memory. I know how to use docker locally but never tried it on the cloud.

      1. Is there any ready-made solution for running Tensorflow on GCP?
      2. If not, which service (Compute Engine or Container Engine) would make it easier to get started?
      3. Any other tip is also appreciated!

      解决方案

      Summing up the answers:

      • Datalab
      • Cloud ML
      • Manual installation on Compute Engine. See instructions below.

      Step by step instructions to 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:

      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. and @CJCullen.

      这篇关于哪种Google云端平台服务最容易运行Tensorflow?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆