Creating an Amazon Machine Picture (AMI) makes it quick and ordinary to rebuild a specific EC2 setup. This postbode illustrates the process by creating an AMI with ethminer and NVIDIA GPU drivers. Of course you’d never use this for mining Ether because the hardware costs are still too high!
Spin Up an Example
Very first we’ll need to create an EC2 example. We’ll request a g2.2xlarge spot example with the Ubuntu 16.04 base AMI. Once the request has bot fulfilled and the example is active wij can connect via SSH.
Now the joy embarks.
Update the APT cache.
Install make , gcc and the kernel header files. We’ll need thesis to build the NVIDIA driver.
Installing NVIDIA Driver
Download the NVIDIA drivers and run the installer.
Accept the license conditions. There will be a duo of warnings, which you can securely overlook. Choose to run nvidia-xconfig . When the installer has finished, reboot.
Obviously your connection will be cracked during the reboot, so reconnect. Check that the drivers are installed and a GPU detected.
Next we’ll install ethminer . Wij could build it from source, but there’s a precompiled binary available too, so let’s go with that.
Unpack and budge the binary into a location on the execution path.
Check that it works.
Before wij create the AMI, quickly clean up the ubuntu huis folder. No sense te leaving cruft lounging around.
Create the AMI
The process of creating an AMI takes place on the EC2 instrumentenbord, so head back there ter your browser.
- Select Instances from the menukaart on the left and choose the example that we’ve bot working on.
- From the Deeds dropdown, select Photo and then Create Picture.
- Give it a suitable name and description.
- Select AMIs from the spijskaart on the left. The freshly created AMI should now be listed.
- At this stage you can securely terminate the example we’ve bot working on.
You can now lightly create fresh EC2 instances provisioned with this freshly minted AMI.
Unless you specifically wany to keep your shiny fresh AMI to yourself, you most likely want to make it publicly accessible.
- Select AMIs from the spijskaart on the left. Choose your fresh AMI.
- From the Deeds dropdown, select Modify Picture Permissions.
- Switch the radio button from Private to Public.
- Press Save .
Share it with your friends. Bask te the warm glow of making other people’s lives lighter.
One thing to note: AWS will create a snapshot for this AMI and you will be billed for storage of this snapshot. It’s not prohibitively expensive, but it’s also not free.