官术网_书友最值得收藏!

EC2 and virtual machines

The building block for AWS systems is the Elastic Cloud Compute (EC2) instance; it is a virtual server that allows you to run applications in the cloud. In this chapter, EC2 will be the basis for our cloud computing work. For developers and data scientists, Amazon has a suite of virtual machines called Amazon Machine Images (AMI) that come preloaded with everything you need to get up and running with deep learning in the cloud. For our purposes, Amazon has both an Ubuntu AMI as well as an Amazon Linux distribution AMI, which are preloaded with Python 3 and TensorFlow, PyTorch, and Keras.

To get started with utilizing EC2 for deep learning, we'll just have to follow a few steps: 

  1. Log in to your Amazon Web Services Account.
  2. Search for EC2 in the Search bar and select the service to open a new console.
  3. Choose the Launch Instance button and search for the AWS deep learning AMI in the AWS Marketplace. You can select either the Ubuntu version or Amazon Linux. 
  4. Select a GPU instance to run your image on. We suggest either a G2 or P2 instance. Choose Next on each page until you reach Configure Security Group. Under Source, choose My IP to allow access using only your IP address.
  5. Click Launch Instance.
  6. Create a new Private Key and store this somewhere locally; this will help you connect to your instance later on. 

Now, you should have your AMI set up and ready to utilize. If you already have an EC2 instance up and running 0n your AWS account, select the instance and right-click on Image, Create Image under the dropdown for that instance:

Follow the prompts and select Create Image. Afterwards, you can find that AMI by selecting EC2 -> AMIs under the main Explorer toolbar. If you still can't see your AMI, you can find more detailed instructions on AWS website https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html.

To utilize your new virtual machine, first launch the instance on AWS. Here ssh is initialized by utilizing the following command (make sure you are in the same directory as the pem key file you just downloaded):

cd /Users/your_username/Downloads/
ssh -L localhost:8888:localhost:8888 -i <your .pem file name> ubuntu@<Your instance DNS>

Once you've connected with your terminal or command line, you can utilize the interface just as you would the command line on your local computer. 

主站蜘蛛池模板: 长垣县| 灌阳县| 大宁县| 海口市| 平邑县| 梓潼县| 大同县| 五指山市| 兴文县| 游戏| 桃园市| 元阳县| 靖宇县| 辽宁省| 宜昌市| 驻马店市| 清原| 乳源| 高平市| 中卫市| 夏河县| 庄浪县| 正安县| 三穗县| 义乌市| 永宁县| 炉霍县| 沂源县| 苏尼特左旗| 苏尼特左旗| 花莲市| 舒兰市| 渭源县| 福建省| 襄垣县| 邵阳县| 塔河县| 贺兰县| 五常市| 开阳县| 万年县|