Welcome to the RenderLab! This project provides cloud-based virtual workstations with GPU accelerators for AI generative graphics workloads. The application leverages Next.js for the web interface and AWS CDK for deploying the infrastructure to AWS.
web
: Contains the Next.js application code.cdk
: Contains AWS CDK code for deploying the infrastructure.
-
Navigate to the
web
directory:cd web
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
Your application will start at http://localhost:3000.
This repository contains the necessary CDK code for deploying graphics-optimized cloud workstations on AWS.
cd cdk
npm install
Edit cdk/bin/renderlab.ts
to configure the parameters:
ACCOUNT
andREGION
: Your AWS account ID and region.NICE_DCV_DISPLAY_DRIVER_URL
,NICE_DCV_SERVER_URL
: Download URLs for NICE DCV components.InstanceSize
: E.g.,g5.xlarge
,g4dn.xlarge
.associateElasticIp
,EC2_KEYPAIR_NAME
,VOLUME_SIZE_GIB
,OPEN_PORTS
,ALLOW_INBOUND_CIDR
,GRID_SW_CERT_URL
,tags
,SEVEN_ZIP_URL
,CHROME_URL
: Various configurations related to the EC2 instance.
- Bootstrap your environment: (Only required once per account/region)
cdk bootstrap
- Deploy the stack:
cdk deploy <StackName>
Replace <StackName>
with your desired stack name.
List EC2 key pairs
aws ec2 describe-key-pairs --query 'KeyPairs[*].KeyName' --output table
Create a new key pair and save the PEM file
KEY_NAME=GamingOnEc2
aws ec2 create-key-pair --key-name $KEY_NAME --query 'KeyMaterial' --output text > $KEY_NAME.pem
Start/Stop an EC2 instance
aws ec2 start-instances --instance-ids INSTANCE_ID
aws ec2 stop-instances --instance-ids INSTANCE_ID
Create an AMI
aws ec2 create-image --instance-id <YOUR_INSTANCE_ID> --name <AMI_NAME>
Start an instance from a launch template
aws ec2 run-instances --image-id <YOUR_AMI_ID> --launch-template LaunchTemplateName=<TEMPLATE_NAME> --query "Instances[*].[InstanceId, PublicIpAddress]" --output table
List instances
aws ec2 describe-instances --query "Reservations[*].Instances[*].[ImageId, InstanceType, VpcId, State.Name, PublicIpAddress, LaunchTime]" --output table
Deploy all stacks without rollback and approval for IAM resources
cdk deploy --all --no-rollback --concurrency=3 --require-approval=never
List all stacks
cdk list
Tail CloudFormation logs
Get-Content -Path C:\cfn\log\cfn-init.log -Wait