Skip to content

Commit ffd85f0

Browse files
authored
Add instructions for AWS installation (#12)
Amazon may have its own instructions - and we can link to them from this doc - but I wanted us to give some instruction on where to start.
1 parent c769207 commit ffd85f0

File tree

4 files changed

+77
-18
lines changed

4 files changed

+77
-18
lines changed

_get_started/get-started-via-cloud-partners.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ published: true
99

1010
<div class="container-fluid quick-start-module quick-starts">
1111
<div class="cloud-options-col">
12-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
13-
1412
{% include quick_start_cloud_options.html %}
1513
</div>
1614
</div>
1715

18-
### Elit scelerisque mauris
19-
20-
Lorem ipsum dolor sit amet, ex mei graeco alienum imperdiet. Recusabo consequuntur mei ei, habeo iriure virtute eam cu, in erat placerat vis. Eu mea nostrum inimicus, cum id aeque utamur erroribus.
21-
22-
- Lorem ipsum dolor sit amet, ex mei graeco alienum imperdiet. Recusabo consequuntur mei ei, habeo iriure virtute eam cu, in erat placerat vis. Eu mea nostrum inimicus, cum id aeque utamur erroribus.
16+
---
2317

24-
- Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
18+
{% capture aws %}{% include_relative installation/aws.md %}{% endcapture %}
2519

26-
Sit amet cursus sit amet. Elit scelerisque mauris pellentesque pulvinar pellentesque habitant. Viverra aliquet eget sit amet tellus cras adipiscing enim. Accumsan in nisl nisi scelerisque
20+
<div id="cloud">
21+
<div class="platform aws">{{aws | markdownify }}</div>
22+
</div>

_get_started/installation/aws.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Pytorch Usage Details: AWS
2+
3+
To gain the full experience of what PyTorch has to offer, a machine with at least one dedicated NVIDA GPU is necessary. While it is not always practical to have your own machine with these specifications, there are our cloud based solutions to allow you to test and use PyTorch's full features.
4+
5+
AWS [provides](https://aws.amazon.com/machine-learning/amis/){:target="_blank"} both:
6+
7+
* dedicated, pre-built machine learning instances, complete with PyTorch
8+
* bare Linux and Windows instances for you to do a custom install of PyTorch.
9+
10+
## AWS Primer
11+
12+
In order to use AWS, you need to set up an [AWS account](https://aws.amazon.com/getting-started/){:target="_blank"}, if you do not have one already. You will create a username (your email address), password and an AWS account name (since you can create multiple AWS accounts for different purposes). You will also provide contact and billing information. The billing information is important because while AWS does provide what they call “free-tier” instances, to use PyTorch you will want more powerful, paid instances.
13+
14+
Once you are logged in, you will be brought to your [AWS console](https://aws.amazon.com/console/){:target="_blank"}. You can even learn more about AWS through a set of [simple tutorials](https://aws.amazon.com/getting-started/tutorials/){:target="_blank"}.
15+
16+
### GPU-based instances
17+
18+
Generally, you will be using Amazon Elastic Compute Cloud (or [EC2](https://aws.amazon.com/ec2/){:target="_blank"}) to spin up your instances. Amazon has various [instance types](https://aws.amazon.com/ec2/instance-types/){:target="_blank"}, each of which are configured for specific use cases. For PyTorch, it is highly recommended that you use the accelerated computing, or [p3](https://aws.amazon.com/ec2/instance-types/p3/){:target="_blank"}, instances. They are tailored for the high compute needs of machine learning.
19+
20+
The expense of your instance is directly correlated to the number of GPUs that it contains. The p3.2xlarge instance is the smallest, cheapest instance and can actually be suitable for many use cases.
21+
22+
### Creating and Launching an Instance
23+
24+
Once you decided upon your instance type, you will need to create, optionally configure and launch your instance. You can connect to your instance from the web browser or a command-line interface. Here are guides for instance launch for various platforms:
25+
26+
* [Linux](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html/){:target="_blank"}
27+
* [Windows](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2_GetStarted.html){:target="_blank"}
28+
* [Command-line](https://docs.aws.amazon.com/cli/latest/userguide/cli-using-ec2.html){:target="_blank"}
29+
30+
## Pre-Built AMIs
31+
32+
AWS provides instances (called AWS Deep Learning AMIs) pre-built with a modern version of PyTorch. The available AMIs are:
33+
34+
* Ubuntu
35+
* Amazon Linux
36+
* Windows 2016
37+
38+
Amazon has written a good [blog post](https://aws.amazon.com/blogs/machine-learning/get-started-with-deep-learning-using-the-aws-deep-learning-ami/){:target="_blank"} on getting started with pre-built AMI.
39+
40+
## Installing PyTorch From Scratch
41+
42+
You may prefer to start with a bare instance to install PyTorch. Once you have connected to your instance, setting up PyTorch is the same as [setting up locally](get-started) for your operating system of choice.

_sass/get-started.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,16 @@
126126
display: block;
127127
}
128128

129+
#cloud .platform {
130+
display: none;
131+
}
132+
133+
#cloud .selected {
134+
display: block;
135+
}
136+
129137
#screencast {
130138
iframe {
131139
width: 100% !important;
132140
}
133-
}
141+
}

assets/quick-start-module.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ var supportedOperatingSystems = new Map([
77

88
var opts = {
99
cuda: 'cuda9.0',
10-
os: getDefaultSelectedPlatform(),
10+
os: getDefaultSelectedOS(),
1111
pm: 'conda',
1212
python: 'python3.6',
13-
}
13+
};
14+
15+
var supportedCloudPlatforms = [
16+
'aws',
17+
'google-cloud',
18+
'microsoft-azure',
19+
];
1420

1521
var os = $(".os > .option");
1622
var package = $(".package > .option");
@@ -35,8 +41,8 @@ cuda.on("click", function() {
3541
document.getElementById(opts.os).click();
3642

3743

38-
// determine platform (mac, linux, windows) based on user's platform
39-
function getDefaultSelectedPlatform() {
44+
// determine os (mac, linux, windows) based on user's platform
45+
function getDefaultSelectedOS() {
4046
var platform = navigator.platform.toLowerCase();
4147
for (var [navPlatformSubstring, os] of supportedOperatingSystems.entries()) {
4248
if (platform.indexOf(navPlatformSubstring) !== -1) {
@@ -53,13 +59,13 @@ function selectedOption(option, selection, category) {
5359
opts[category] = selection.id;
5460
commandMessage(buildMatcher());
5561
if (category === "os") {
56-
display(opts.os);
62+
display(opts.os, 'installation', 'os');
5763
}
5864
}
5965

60-
function display(selection) {
61-
var container = document.getElementById('installation');
62-
var elements = container.getElementsByClassName("os");
66+
function display(selection, id, category) {
67+
var container = document.getElementById(id);
68+
var elements = container.getElementsByClassName(category);
6369
for (var i = 0; i < elements.length; i++) {
6470
if (elements[i].classList.contains(selection)) {
6571
$(elements[i]).addClass("selected");
@@ -384,6 +390,13 @@ $(".dropdown").on("show.bs.dropdown", function () {
384390
.find(".cloud-option")
385391
.addClass("active-cloud-options with-down-arrow")
386392
.removeClass("animated-border");
393+
var cls = $(this).find(".cloud-option-body")[0].className;
394+
for (var i = 0; i < supportedCloudPlatforms.length; i++) {
395+
console.log(cls);
396+
if (cls.includes(supportedCloudPlatforms[i])) {
397+
display(supportedCloudPlatforms[i], 'cloud', 'platform');
398+
}
399+
}
387400
});
388401

389402
$(".dropdown").on("hide.bs.dropdown", function () {

0 commit comments

Comments
 (0)