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

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. 

主站蜘蛛池模板: 固镇县| 新龙县| 乐平市| 涿鹿县| 闻喜县| 孟村| 张北县| 新乐市| 噶尔县| 华安县| 泗洪县| 清河县| 合水县| 丰顺县| 镇康县| 汝南县| 新乐市| 韶山市| 定兴县| 新野县| 扎兰屯市| 英超| 新郑市| 左权县| 卢氏县| 周宁县| 金沙县| 文安县| 灵璧县| 石林| 河南省| 咸丰县| 泽普县| 淳化县| 平谷区| 贡觉县| 泰顺县| 石河子市| 元谋县| 竹溪县| 惠州市|