哪个 Google Cloud Platform 服务最容易运行 Tensorflow? [英] Which Google Cloud Platform service is the easiest for running Tensorflow?

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

问题描述

在完成 Udacity 深度学习作业时,我遇到了内存问题.我需要切换到云平台.我之前使用过 AWS EC2,但现在我想尝试 Google Cloud Platform (GCP).我至少需要 8GB 内存.我知道如何在本地使用 docker,但从未在云端尝试过.

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. 有没有现成的解决方案可以在 GCP 上运行 Tensorflow?
  2. 如果没有,哪种服务(Compute Engine 或 Container Engine)会更容易上手?
  3. 还感谢您提供任何其他提示!

推荐答案

总结答案:

  • AI 平台笔记本 - 一键式 Jupyter 实验室环境
  • 深度学习虚拟机映像 - 预装了机器学习库的原始虚拟机
  • 深度学习容器镜像 - DLVM 的容器化版本图片
  • 云机器学习
  • 在 Compute Engine 上手动安装.请参阅下面的说明.
  • 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.
      1. 创建项目
      2. 打开云外壳(顶部的按钮)
      3. 列出机器类型:gcloud 计算机器类型列表.您可以更改我在下一个命令中使用的机器类型.
      4. 创建一个实例:
      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. 运行 sudo docker run -d -p 8888:8888 --name tf b.gcr.io/tensorflow-udacity/assignments:0.5.0(将镜像名称改为想要的)
      2. 仪表板中找到您的实例并编辑default 网络.
      3. 添加防火墙规则以允许您的 IP 以及协议和端口 tcp:8888.
      4. 从仪表板中查找实例的外部 IP.在浏览器上打开 IP:8888.完成!
      5. 完成后,删除创建的集群以避免产生费用.
      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.

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

      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.
      • 您的 Cloud Shell 主目录的内容在所有 Cloud Shell 会话之间的项目中持续存在,即使在虚拟机终止并重新启动之后也是如此"
      • 要列出所有可用的图像版本:gcloud compute images list --project google-containers

      感谢@user728291、@MattW、@CJCullen 和@zain-rizvi

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

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

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