[英]Run Python Script on AWS and transfer 5GB of files to EC2
I am an absolute beginner in AWS: I have created a key and an instance, the python script I want to run in the EC2 environment needs to loop through around 80,000 filings, tokenize the sentences in them, and use these sentences for some unsupervised learning.我是 AWS 的绝对初学者:我已经创建了一个密钥和一个实例,我想在 EC2 环境中运行的 python 脚本需要遍历大约 80,000 个文件,标记其中的句子,并将这些句子用于一些无监督学习.
This might be a duplicate;这可能是重复的; but I can't find a way to copy these filings to the EC2 environment and run the python script in EC2, I am also not very sure as to how I can use boto3.
但是我找不到将这些文件复制到 EC2 环境并在 EC2 中运行 python 脚本的方法,我也不太确定如何使用 boto3。 I am using Mac OS.
我正在使用 Mac 操作系统。 I am just looking for any way to speed things up.
我只是在寻找任何方法来加快速度。 Thank you so so much!
非常感谢! I am forever grateful!!!
我永远心存感激!!!
Here's one way that might help:这是一种可能有帮助的方法:
aws s3 sync
aws s3 sync
将 S3 文件同步到 EC2 实例I'm assuming you've launched EC2 with enough diskspace to hold the files.我假设您已经启动了具有足够磁盘空间来保存文件的 EC2。
Here's what I tried recently:这是我最近尝试的:
wget
copies the file into EC2 instance. wget
将文件复制到 EC2 实例中。 If your files are in zip format, one time copy enough to move all the files into instance.如果您的文件是 zip 格式,请复制一次足以将所有文件移动到实例中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.