LogoLogo
  • TABLE OF CONTENTS
  • General Concepts
    • Overview
    • Introduction to Rendered.ai
    • The Rendered.ai Platform
    • Who Uses Rendered.ai?
    • Rendered.ai Licensing and Offerings
  • Application User Guides
    • Overview
    • Quick Start Guide
      • Terminology
      • Content Codes
      • Getting Started with the SDK
    • Tutorials
      • Organization and Workspace Resources
      • Creating and Using Graphs
        • Graph Validation
        • Graph Best Practices
      • Creating and Using Datasets
        • Dataset Annotations
        • Dataset Analytics
        • Domain Adaptation
        • Dataset Comparison
        • Training and Inference
        • Mixing Datasets
        • Dataset Best Practices
      • Creating and Using Volumes
        • Inpaint Service
      • Collaboration
  • Development Guides
    • Overview
    • Ana Software Architecture
      • Basic components
      • Graphs
      • Channels
      • Packages
      • Package Volumes
      • Nodes
      • Schema
      • Ana Modules, Classes, and Functions
      • The anatools Package
      • Graph Validation
        • Typical Validation Use Cases
      • Preview
      • In-tool Help
    • Setting Up the Development Environment
      • Local Development With NVIDIA GPUs
      • Remote Development With AWS EC2
    • Deploying a Channel
    • An Example Channel - Toybox
      • Run and Deploy the Toybox Channel
      • Add a Modifier Node
      • Add a Generator Node
  • Open Source Channels
    • Toybox
    • DIRSIG Channel
  • Release Notes
    • Rendered.ai Platform
      • Platform Version 1.6.0
      • Platform Version 1.5.0
      • Platform Version 1.4.1
      • Platform Version 1.4.0
      • Platform Version 1.3.2
      • Platform Version 1.3.1
      • Platform Version 1.3.0
      • Platform Version 1.2.6
      • Platform Version 1.2.5
      • Platform Version 1.2.4
      • Platform Version 1.2.3
      • Platform Version 1.2.2
      • Platform Version 1.2.1
      • Platform Version 1.2.0
      • Platform Version 1.1.5
      • Platform Version 1.1.4
      • Platform Version 1.1.3
      • Platform Version 1.1.2
      • Platform Version 1.1.1
      • Platform Version 1.1.0
      • Platform Version 1.0.3
      • Platform Version 1.0.2
      • Platform Version 1.0.1
      • Platform Version 1.0.0
      • Platform Version 0.3.4.4
      • Platform Version 0.3.4.3
      • Platform Version 0.3.4.2
      • Platform Version 0.3.4.1
      • Platform Version 0.3.4
      • Platform Version 0.3.3.1
      • Platform Version 0.3.3
      • Platform Version 0.3.2.2
      • Platform Version 0.3.2.1
      • Platform Version 0.3.2
      • Platform Version 0.3.1.6
      • Platform Version 0.3.1.5
      • Platform Version 0.3.1.4
      • Platform Version 0.3.1.3
      • Platform Version 0.3.1.2
      • Platform Version 0.3.1
      • Platform Version 0.3.0.9
      • Platform Version 0.3.0.8
      • Platform Version 0.3.0.7
      • Platform Version 0.3.0.6
      • Platform Version 0.3.0.5
      • Platform Version 0.3.0
      • Platform Version 0.2.15
      • Platform Version 0.2.14
      • Platform Version 0.2.13
      • Platform Version 0.2.12
      • Platform Version 0.2.11
      • Platform Version 0.2.10
      • Platform Version 0.2.9
      • Platform Version 0.2.8
      • Platform Version 0.2.7
      • Platform Version 0.2.6
      • Platform Version 0.2.5
      • Platform Version 0.2.4
      • Platform Version 0.2.3
      • Platform Version 0.2.2
      • Platform Version 0.2.1
      • Platform Version 0.2.0
Powered by GitBook
On this page
  • Configuring an EC2 Instance
  • Connect to the Instance in VSCode
Export as PDF
  1. Development Guides
  2. Setting Up the Development Environment

Remote Development With AWS EC2

PreviousLocal Development With NVIDIA GPUsNextDeploying a Channel

Last updated 7 months ago

This guide will walk the reader through setting up a remote instance in AWS EC2 and connecting with that instance with the VSCode Remote - SSH extension. This allows users who do not have a compatible local environment to do channel development and can be a good way to ensure your channel will run correctly after being deployed to the platform.

Configuring an EC2 Instance

Selecting the right EC2 image, instance, disk space, etc can be a point of confusion. To start configuring a new instance for channel development, sign in to your AWS account, set the region you want to use for the compute, and go to the EC2 dashboard.

Select an AMI

The AMI Catalog has several pre-configured instances that will work for channel development. The instance operating system needs to be Linux-based and will need NVIDIA and Docker. In this example, we will use the Ubuntu Deep Learning Base AMI. To find this AMI in the EC2 dashboard, look under Images and navigate the AMI Catalog then search for “nvidia”. After selecting the AMI, click the Launch Instance with AMI button at the top to move on in the setup wizard.

In the “Launch an instance” dialogue, give the instance a name, such as “Channel Development”, and select a an instance type. We recommend selecting an instance that has at least one GPU, for example, an instance from the p or g family.

The majority of channels launched on the Rendered.ai platform use the AWS g4dn.2xlarge instance type.

Next a Key Pair is added so you can connect to the instance locally. If you have not set up a Key Pair in AWS, follow the dialog using all the default options. Download the .pem file and do not loose it! This is your key to accessing instance once it's running.

Finally, you might want to add extra disk space for storing generated images and videos. We recommend adding 100 GB of general purpose storage. AWS has a procedure to move your AMI to an instance with more storage later, but it's easier to add it here.

Now you can launch the instance. The default values for the remaining parameters are appropriate for channel development (generic security group, allow SSH traffic).

Launch the Instance

After completing the wizard, the instance will begin the launch process. This can take some time depending on the instance type and availability. You will need to wait until your instance is in the Running state with “2/2 checks passed” for the status check.

Billing is calculated from when the instance starts running. Make sure to stop the instance when you are done!

Once the instance is in the “Running” state you can ssh to it using the Public IPv4 address and DNS.

In the above screenshot, the public DNS is circled. Copy this for the configuration of VSCode below. For information about more ways to connect to the instance, including from the command line, follow the Connect button.

Restrict the Permissions of your PEM file

It is required the local identity file not be readable by others. On Mac and Linux, the permissions can be set in a shell as follows: chmod 400 <key name>.pem

For Windows developers, we recommend installing Ubuntu in WSL, the Windows Subsystem for Linux.

  • From PowerShell, run "wsl --install -d ubuntu"; you’ll have to create a username and password for the new OS.

  • Find and save the *.pem file from earlier into a directory that can be accessed by WSL Ubuntu.

  • Update the permissions of the .pem file by rght clicking on it, selecting "Properties" and check "Read-only". Next, under "Security" - "Advanced", select "Disable Inheritance" and for the users, "Remove All". Click "Apply", and your group or user names should be empty. Go back to "Advanced" and add your windows user and apply. Next, in the permissions give all permissions to your user.

Connect to the Instance in VSCode

Open VSCode and install “Remote - SSH” and “Remote - Containers” extensions. In the following screen shot, the extensions menu is active and the said extensions are found by searching for the keyword “remote”.

To connect to the AMI, update your ssh config file. This can be done right in VS Code by clicking the green box on the bottom left and then “Open SSH Configuration File…”.

This file is in your home directory, ~/.ssh/config. On Windows, you need to restrict the permissions on the ssh config file as described above for the .pem file.

Add an entry to the ssh configuration file as follows:

Host <ami name>
    HostName <public DNS>
    IdentityFile <key location>/<key name>.pem
    User ec2-user

All the items that are surrounded by angle bracket need to be replaced.

  • <ami name> is the name of the host, e.g. ‘anadevami’. This can be whatever reminds you of the entry when connecting

  • <public DNS> is the URL from the AWS dashboard above, it takes the form 'ec2-xx-xx-xx-xx.us-xxx-x.compute.amazonaws.com'

  • <key name> is the name you gave the key pair and <key location> is where the .pem file is stored. This might be in Downloads and is safely stored by moving it to the .aws directory in your home directory.

Now you can connect to the instance by using the “Connect to Host…” command in VSCode.

Clicking “Connect to Host…” will then list all the entries in your ssh config file. Select the one you just created.

Watch the lower left green icon to verify VSCode is connected to the host. If you have trouble connecting, the logs can be found in VSCode to run down any issues.

Now you can clone a channel repository and begin development as described here:

Run and Deploy the Toybox Channel
Configuring an EC2 Instance
Select an AMI
Launch the Instance
Restrict Identity File Permissions
Connect to the Instance in VSCode
AWS Instances View
Find the Instance Public DNS
VSCode Extensions Can be Found in the Red Circled Button
Connect to the AMI
Choose the New SSH Config