带有URL路径的Docker满

问题描述

大家好,

任何人都知道是否可以从github上拉一个容器吗?我确实有此链接https://github.com/aws/sagemaker-pytorch-training-toolkit,我想在此链接https://github.com/aws/sagemaker-pytorch-training-toolkit/tree/master/src/sagemaker_pytorch_container中拉出容器。

我确实尝试使用构建docker build -t https://github.com/abc/sagemaker-pytorch-training-toolkit.git来构建一个文件的映像,但是有一个init.py文件,我不确定是否需要。

谢谢

解决方法

您走错了路。

  1. Github不存储docker映像,因此无法从那里拉出它。
  2. AWS Sagemaker提供了预构建的图像,您只需要选择要在创建实例时使用的图像即可。参见https://docs.aws.amazon.com/sagemaker/latest/dg/howitworks-create-ws.html
  3. 如果您需要带有pytorch的码头工人,只需运行docker pull pytorch/pytorch