-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes issue #45 Turns of unattended-upgrades Updates build instructions Remove obsolete ~/.aws/config * Fix typo in instructions * Fix typo in instructions
- Loading branch information
1 parent
c1eaf54
commit 756d657
Showing
4 changed files
with
61 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo sed -i 's/APT::Periodic::Unattended-Upgrade "1";/APT::Periodic::Unattended-Upgrade "0";/' /etc/apt/apt.conf.d/20auto-upgrades |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,59 @@ | ||
# Notes on using the AWS DL AMI as the base image | ||
# How to Build/Deploy a Resero-labs dlami | ||
|
||
We are using verison 22.0 (ami-01a4e5be5f289dd12) currently, but have modified it (by hand) to create our base image | ||
The modifications are as follows: | ||
|
||
1) ssh into image | ||
2) Wait for /var/log/unattended-upgrades/unattended-upgrades.log to emit a line | ||
1) create instance of DLAMI. (Watch for updates [Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C).) | ||
|
||
`create-dock -a ami-01a4e5be5f289dd12 -s -m base-ami -i p3.2xlarge` | ||
2) ssh into image. | ||
|
||
`ssh-dock base-ami` | ||
3) Wait for /var/log/unattended-upgrades/unattended-upgrades.log to emit a line. | ||
that looks like: `2019-01-24 17:52:10,320 INFO All upgrades installed` (should be aobut 15 minutes) | ||
3) reboot | ||
4) run upgrade.sh script | ||
|
||
Because this takes such a long time, go ahead and create an image from this instance | ||
and use that as the base instead of building it into the packer script. | ||
4) reboot | ||
|
||
```bash | ||
stop-dock base-ami | ||
start-dock base-ami | ||
``` | ||
5) run upgrade.sh script | ||
|
||
```bash | ||
scp upgrade.sh <base-ami-ip>:~/ | ||
ssh-dock base-ami | ||
./upgrade.sh | ||
``` | ||
6) reboot and ensure that nvidia drivers still good | ||
|
||
`nvidia-smi` | ||
7) Create an image from this instance | ||
|
||
`aws ec2 create-image --instance-id i-0238495638422d858 --name resero-labs-dlami-base-22.0-2019.04` | ||
|
||
(Instance id can be found in the console or in `~/.docker/<ip-addr>/connection_config.txt`. | ||
AMI name should follow the convention `resero-labs-dlami-base-<dlami-version>-<date-created>`) | ||
8) Terminate the base-ami dock | ||
|
||
`destroy-dock base-ami -f` | ||
9) Use the ami from previous step as the base ami in the packer script | ||
|
||
```bash | ||
edit resero-labs-dl.packer and update both the "name" and "source_ami" values appropriately | ||
packer build resero-labs-dl.packer | ||
``` | ||
|
||
10) Validate the new ami | ||
|
||
```bash | ||
create-dock -a <resero-labs-dlami-candidate> -m test-ami -i p3.2xlarge | ||
source dock test-ami | ||
docker images | ||
ssh-dock | ||
nvidia-smi | ||
castoff | ||
destroy-dock test-ami -f | ||
``` | ||
|
||
Optionally, we may want to consider running the upgrade-docker script in this | ||
directory, but we are not currently doing so. | ||
11) Switch names of previous resero-labs-dlami with the one just created | ||
|
||
## Watch for updates | ||
[Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters