by lettergram · 10y ago · 0 comments
You really dont need $2k workstation..
Of course, for personal use I do have a gtx 1080 because I like to game and play tensorflow/caffe
You should always try to keep the instances stateless and store any data outside the instances, such as on S3 or EFS.
https://github.com/ledell/h2oEnsemble-benchmarks/blob/master...
You can also do stuff like following in python to execute some code:
os.system("scp script_demo.py " + sys.argv[1] + ":/home/ubuntu/")
os.system("ssh " + sys.argv[1] + " sudo chmod 777 /home/ubuntu/script_demo.py")
os.system("ssh " + sys.argv[1] + " './script_demo.py'")
os.system("scp " + sys.argv[1] + ":/home/ubuntu/output/* ./output/")
Then it will execute, after it executes - shut it down.You don't need sudo, because it's your file. You need just "chmod 755", not "777". And you don't need chmod in the first place - just run "python script_demo.py".
Also, you are being rather pedantic here. If people can figure out how to take what I copied & pasted and turn it into a script they can probably know chmod 777 isn't great.
That being said, and why I think this is ridiculous, is that you are assuming this matters. Going into the weeds here, to play along: The script is immediately being ran, on temporary and very recently launched ec2 instance, probably with the use of a pem and that presumably can even be part of AWS security group that only allows your IP, and is shut down following it's execution.
I can't picture this being a security vulnerability at all. Calling it a terrible example is relative - I wrote this copy and pasted on a cell phone trying to help someone. Honestly, didn't even see the "sudo chmod 777", just pasted away.
Can you expand on that? What happened?