SageMaker和TensorFlow 2.0 [英] SageMaker and TensorFlow 2.0

查看:80
本文介绍了SageMaker和TensorFlow 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用AWS Sagemeker运行TensorFlow 2.0的最佳方法是什么?

What is the best way to run TensorFlow 2.0 with AWS Sagemeker?

截至今天(2019年8月7日),AWS不提供TensorFlow 2.0 SageMaker容器,所以我的理解是我需要构建自己的.

As of today (Aug 7th, 2019) AWS does not provide TensorFlow 2.0 SageMaker containers, so my understanding is that I need to build my own.

要使用的最佳基本映像是什么?示例Dockerfile?

What is the best Base image to use? Example Dockerfile?

推荐答案

Amazon SageMaker现在确实支持TF 2.0和更高版本.

  • SageMaker + TensorFlow docs: https://sagemaker.readthedocs.io/en/stable/frameworks/tensorflow/using_tf.html
  • Supported Tensorflow versions (and Docker URIs): https://aws.amazon.com/releasenotes/available-deep-learning-containers-images

原始答案

以下是使用基础SageMaker容器库的示例Dockerfile(这是在正式的预建Docker映像中使用):

Here is an example Dockerfile that uses the underlying SageMaker Containers library (this is what is used in the official pre-built Docker images):

FROM tensorflow/tensorflow:2.0.0b1

RUN pip install sagemaker-containers

# Copies the training code inside the container
COPY train.py /opt/ml/code/train.py

# Defines train.py as script entrypoint
ENV SAGEMAKER_PROGRAM train.py

有关此方法的更多信息,请参见 https://docs.aws.amazon.com/sagemaker/latest/dg/build-container-to-train-script-get-started.html

For more information on this approach, see https://docs.aws.amazon.com/sagemaker/latest/dg/build-container-to-train-script-get-started.html

这篇关于SageMaker和TensorFlow 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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