如何将脚本拷贝到AWS云中集群的leader节点上运行?

2024-05-29 02:02:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我是一个新手在辛苦和AWS试图运行你好世界.py劳动文件中的示例。我已经在本地的mac笔记本电脑上成功安装了toil和相关的python包,并在AWS上设置了我的帐户。 我已经创建了一个小型的领导者/工作者集群,并声明: $cgcloud create cluster toil-s 2-t m3.大型 $cgcloud ssh劳动领袖 这里,辛劳的文件是这样写的: 放置你好世界.py在“引线”节点上编写脚本,然后运行: python你好世界.py--batchSystem=mesos--mesosMaster=master私有ip:5050美国焊接学会:us-west-2:我的aws jobstore

我的问题是:我如何放置(拷贝到)文件你好世界.py在leader节点上编写脚本?你知道吗


Tags: 文件py脚本aws示例节点mac世界
1条回答
网友
1楼 · 发布于 2024-05-29 02:02:46

您可以使用toil rsync-cluster命令。这可以作为标准unix命令rsync的包装器,并将指定的文件复制到leader节点。你知道吗

它看起来像是您根据上面的create-cluster命令将集群命名为toil。要将文件复制到集群的领导者,您可以运行

$ toil rsync-cluster toil /path/to/HelloWorld.py :/remote/destination

这是来自Toil documentation

The most frequent use case for the rsync-cluster utility is deploying your Toil script to the Toil leader. Note that the syntax is the same as traditional rsync with the exception of the hostname before the colon. This is not needed in toil rsync-cluster since the hostname is automatically determined by Toil.

Here is an example of its usage:

$ toil rsync-cluster CLUSTER-NAME-HERE \    
       ~/localFile :/remoteDestination

相关问题 更多 >

    热门问题