哪个 Google Cloud Platform 服务最容易运行 Tensorflow? [英] Which Google Cloud Platform service is the easiest for running 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.
- 有没有现成的解决方案可以在 GCP 上运行 Tensorflow?
- 如果没有,哪种服务(Compute Engine 或 Container Engine)会更容易上手?
- 还感谢您提供任何其他提示!
推荐答案
总结答案:
- AI 平台笔记本 - 一键式 Jupyter 实验室环境
- 深度学习虚拟机映像 - 预装了机器学习库的原始虚拟机
- 深度学习容器镜像 - DLVM 的容器化版本图片
- 云机器学习
- 在 Compute Engine 上手动安装.请参阅下面的说明.
- 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.
- Create a project
- Open the Cloud Shell (a button at the top)
- List machine types:
gcloud compute machine-types list
. You can change the machine type I used in the next command. - Create an instance:
Summing up the answers:
gcloud compute instances create tf
--image container-vm
--zone europe-west1-c
--machine-type n1-standard-2
- 运行
sudo docker run -d -p 8888:8888 --name tf b.gcr.io/tensorflow-udacity/assignments:0.5.0
(将镜像名称改为想要的) - 在仪表板中找到您的实例并编辑
default
网络. - 添加防火墙规则以允许您的 IP 以及协议和端口
tcp:8888
. - 从仪表板中查找实例的外部 IP.在浏览器上打开
IP:8888
.完成! - 完成后,删除创建的集群以避免产生费用.
- 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) - Find your instance in the dashboard and edit
default
network. - Add a firewall rule to allow your IP as well as protocol and port
tcp:8888
. - Find the External IP of the instance from the dashboard. Open
IP:8888
on your browser. Done! - 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
- 容器优化的 Google 计算引擎映像
- Google Cloud SDK 以获得响应速度更快的 shell 等.
- 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屋!