Reference resources stayAWS Configure deep learning host on <>

AWS File: <>

Because the local development environment is limited( No high-end graphics card), Therefore, deep learning operation can only use virtual machine of major factories; After comparison, Discover Amazon'saws The most cost-effective way to build a deep learning virtual host, So I decided to use itaws.

Recommended according to, To solve the requirements of basic application, have access toaws Upperp2.xlarge Host instance,p2.xlarge It is a very suitable cloud server for deep learning, It is equipped with 12G Video memory
Tesla K80 Graphics card,4 nucleus CPU,60G Memory, as well as 500M Network speed.

Register account and fill in work order

This part can refer to the original, I need onevisa/Master Card/ Express/JCB
Credit Card, It should be noted that the registration process will be deducted1 Advance charge in USD, To verify the validity of the credit card, this1 Dollars will be returned to the credit card in a few days.
In addition, in addition to the common mail verification during the registration process, There will be phone verification, Just enter the verification code in the phone.

aws Instance setup

AMI Choice

I.e. operating environment, You can create your own, You can also choose what has been built; Because to usep2.xlarge Host, So first of all, we should pay attention to which regions are provided by the host instance, At present, Virginia and Oregon in the United States have confirmed the availability of the host instance, Region selection is in the upper right corner of the login interface:

Registration completed, After successful login, Get intoaws Console, Can see:

Click theEC2, Get intoEC2 Console:

In the restrictions column on the left side of the console, You can see the current permissions of this account, If specific services are required, click“ Request to increase limit”, Then submit the work order.

Click to start the instance Button, Start choosingAMI:

Choose the right project hereAMI, Usually pre installedtensorflow andconda Environmental Science, And installedNvida DrivenAMI, You can search in the search box, such as:

commonlyAMI All with a short description, Choose the right one for your project, If there is a self builtAMI, Or self builtAMI, Ad locum, I chose the second oneAMI.

Select the appropriate instance in the instance type selection, such asp2.xlarge:

Bidding model can be selected in configuration instance, Bidding model recommended, You can set the maximum price manually, When the price is greater than the current available price, Instance will be created; In the subnet option, you can select a specific instance subnet;

Then next to configure security groups

In security group configuration, Inflow and outflow interfaces can be set, The simplest thing here is to set all ports, But there may be security issues( Save the key file)

It can also be set as required:

Recommended or set to all traffic;

Enter the audit page, After checking all parts of the information before, Click Start, Key will be required, You can choose to create a new one( Download and save after new creation) Or there is a key;

Create success, Yes:

The original reference article is based on localLinux System connection method, staywindos10 The following versions ofwindos In the system, It's not self-containedssh service, So you can only chooseputty Connect, Related methods can be found inaws Found in document:
Use PuTTY from Windows connection to Linux Example
, And forwindos10 system, The system has been integratedssh tool, You can add enable in settings, Enable andLinux equally, Direct usessh Connect;

In preservationkey( secret key) Folder of, usebash Terminal input:
ssh -i "a.pem" [email protected]
Among them key For your ownkey,xxxx The address should also be changed to the server you bought ip address. If it prompts you if you want to determine the connection, Click OK:
If it is not enabled in the folder where the key is storedssh, For example, in the desktop root, Instead of:
ssh -i address/a.pem [email protected]
address For local storagekey Relative address of;

After connection, At terminal:

At this time, the virtual host is connected;
staybash Command line experiment, displaypython Edition:
python --version

start-upjupyter notebook, Open a remote connection support jupyter notebook:
jupyter notebook --ip=
Will be displayed in the terminaljupyter Browser address for:
Then enter in the browser The server IP:8888 You can enterjupyter notebook , If it was previously setjupyter
Password, Password is required. For example, the virtual host assignsIP by52.152.152.10, Enter in browser:
So you can get injupyter 了:

Document upload and download

aws Virtual host ofscp Upload and download documents, aboutwindows system, have access towinscp This software:

After downloading and installing, open, Yes:

That is, fill in the host nameaws HostDNS domain name, Usernameubuntu( DifferentAMI User name may be different), Click Advanced again—ssh— Verification, Fill.ppk Suffix key, Click to connect, Can connect;
Need attention:
aws The generated key file isa.pem, Need to useputty Turn it intoa.ppk Document in form, The conversion process can be found inaws File: Use PuTTY from Windows
connection to Linux Example
First time usewinscp Security warning will pop up when remote host is linked, click“ yes/ Determine” that will do;

Successful connection:

Local folder on the left, Remote virtual host folder on the right, Drag the file to finish the upload and download operation.
thus,aws The basic operation requirements of the main engine have been fully met, You can use it to work.

PS: Create privateAMI

When bidding instance is used, Once the instance is stopped,AMI All documents and records in will be destroyed, If you want to save this development environment, Continue to use next time, You can put thisAMI Environment preserved:

click“ Create Image” To create aAMI image, Preservation process3-5 About minutes, After saving successfully, Images that can be in the task list on the left–AMI
Find in, Next time you turn on the remote virtual host, You can select this directlyAMI.

aws Provided for a period of one year30G Free storage for, Exceed30G Or charge for more than one year, therefore, When the project is completed, Please put the unnecessaryAMI Delete all.