Skip to content

Commit a0ead03

Browse files
Update file Developer Environment Guide for Linux.md
1 parent 245462d commit a0ead03

File tree

1 file changed

+71
-75
lines changed

1 file changed

+71
-75
lines changed
Lines changed: 71 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,92 @@
1-
# Development Environment Setup Guide on Linux
2-
# Introduction
3-
This guide establishes a cloud-based development environment using Amazon Linux 2023 on AWS EC2, specifically designed for the GenAI IDP accelerator.
1+
# Development Environment Setup Guide on Linux
2+
# Introduction
3+
This guide establishes a cloud-based development environment using Amazon Linux 2023 on AWS EC2, specifically designed for the GenAI IDP accelerator.
44

5-
Purpose: Provides a standardized, scalable development infrastructure that combines the familiar VSCode interface on your local machine with powerful cloud compute resources. This approach eliminates local environment configuration issues while ensuring consistent development experiences across team members.
5+
Purpose: Provides a standardized, scalable development infrastructure that combines the familiar VSCode interface on your local machine with powerful cloud compute resources. This approach eliminates local environment configuration issues while ensuring consistent development experiences across team members.
66

77
When to use this guide:
8-
You need a new development environment
9-
Your current setup has configuration issues
10-
You prefer cloud-based development with scalable resources
11-
You want a clean, isolated environment for this project
8+
- You need a new development environment
9+
- Your current setup has configuration issues
10+
- You prefer cloud-based development with scalable resources
11+
- You want a clean, isolated environment for this project
1212

13-
What you'll achieve:
13+
What you'll achieve:
1414
A hybrid development setup where your code runs on a pre-configured Amazon Linux EC2 instance while you work through VS Code on your local machine, providing both performance and consistency.
1515

16-
## Step 1: Launch EC2 Instance
16+
# Step 1: Launch EC2 Instance
1717

18-
# 1.1 Navigate to EC2 Console
18+
## 1.1 Navigate to EC2 Console
1919
1. Log into [AWS Management Console](https://console.aws.amazon.com/)
2020
2. Navigate to EC2 service
2121
3. Click Launch Instance
2222

23-
# 1.2 Configure Instance Settings
24-
Name: genai-idp-dev-environment (example)
25-
-AMI Selection:
26-
-• **Amazon Linux 2023**
27-
-Architecture: 64-bit (x86)
28-
-Instance Type:
29-
- Heavy development: t3.2xlarge (8 vCPU, 32 GB RAM)(recommended)
30-
-(Other instance types will also work, but this is one we tested)
23+
## 1.2 Configure Instance Settings
24+
Name: genai-idp-dev-environment(example)
25+
AMI Selection:
26+
**Amazon Linux 2023**
27+
- Architecture: 64-bit (x86)
28+
Instance Type:
29+
- Heavy development: t3.2xlarge (8 vCPU, 32 GB RAM)(recommended)
30+
(Other instance types will also work, but this is one we tested)
3131

32-
# 1.3 Key Pair Setup
32+
## 1.3 Key Pair Setup
3333
1. Click Create new key pair (or select existing)
3434
2. Name: genai-idp-dev-key (example)
3535
3. Type: RSA
3636
4. Format: .pem
3737
5. Download and save the .pem file securely
3838

39-
# 1.4 Network Settings
39+
## 1.4 Network Settings
4040
Security Group Configuration:
41-
1. Create new security group: genai-idp-dev-sg (example)
42-
2. Add these inbound rules:
43-
**SSH**: Port 22, Source: My IP
41+
1. Create new security group
42+
2. Add these inbound rules:
43+
- **SSH**: Port 22, Source: My IP
4444

45-
# 1.5 Storage Configuration
46-
Size: 720 GiB (minimum 20GB)
47-
Type: gp3
48-
Delete on termination: Yes
45+
## 1.5 Storage Configuration
46+
- Size: 720 GiB
47+
- Type: gp3
48+
- Delete on termination: Yes
4949

50-
# 1.6 Launch
50+
## 1.6 Launch
5151
Click Launch instance and wait for it to reach "Running" state.
5252

53-
## Step 2: Connect to Your Instance
53+
# Step 2: Connect to Your Instance
5454

55-
# Get Connection Info
55+
## Get Connection Info
5656
1. Select your instance in EC2 console
5757
2. Note the Public IPv4 address
5858

59-
# SSH Connection Command
59+
## SSH Connection Command
6060
On local machine:
61-
# CMD Terminal
61+
### CMD Terminal
6262
ssh -i /path/to/genai-idp-dev-key.pem ec2-user@YOUR_INSTANCE_IP
63+
### To install git run this command on EC2 Instance
64+
sudo dnf install git -y
6365

64-
# Clone Repository
65-
bash
66+
### Clone Repository
6667
git clone https://github.com/aws-solutions-library-samples/accelerated-intelligent-document-processing-on-aws
6768

68-
# Run the setup script
69-
./dev_setup.sh
70-
71-
## Step 4: Install Visual Studio Code
72-
# 4.1 Visit the official website: Go to [https://code.visualstudio.com/](https://code.visualstudio.com/)
73-
Download: Click the "Download for Windows" button
74-
• This will download the User Installer (recommended for most users)
75-
• File name will be something like VSCodeUserSetup-x64-1.x.x.exe
76-
Install:
77-
• Run the downloaded installer
78-
• Choose installation location (default is recommended)
69+
### Go to directory
70+
cd accelerated-intelligent-document-processing-on-aws/
71+
72+
### Run the setup script for development tools which is scripts directory
73+
cd scripts
74+
sh ./dev_setup.sh
75+
76+
# Step 4: Install Visual Studio Code on Local Machine
77+
## 4.1 Visit the official website: Go to [https://code.visualstudio.com/](https://code.visualstudio.com/)
78+
Download: Click the "Download for Windows" button
79+
- This will download the User Installer (recommended for most users)
80+
- File name will be something like VSCodeUserSetup-x64-1.x.x.exe
81+
Install:
82+
- Run the downloaded installer
83+
- Choose installation location (default is recommended)
7984
Launch: Click "Launch Visual Studio Code" when installation completes
8085

8186
Install Remote - SSH extension (by Microsoft)
8287

83-
# 4.2 Connect via VSCode: Update your SSH config
84-
Press Ctrl+Shift+P for commands
88+
## 4.2 Connect via VSCode: Update your SSH config
89+
Press Ctrl+Shift+P for commands
8590
Append the following block to your ~/.ssh/config file:
8691

8792
```
@@ -96,41 +101,32 @@ Host genai-idp-dev
96101
1. Press Ctrl+Shift+P
97102
2. Type "Remote-SSH: Connect to Host"
98103
3. Select "genai-idp-dev"
99-
4. Open folder: /home/ec2-user//accelerated-intelligent-document-processing-on-aws
104+
4. Open folder: /home/ec2-user/accelerated-intelligent-document-processing-on-aws
100105

101-
## Step 5: Setup
102-
103-
### Setup Python Environment
104-
```bash
105-
# Create and activate virtual environment
106-
python3 -m venv venv
107-
source venv/bin/activate
108-
109-
## Step6: Configure
106+
# Step 5: Configure
110107
For aws configure you need "access key" and "secret access key"
111108
If you have one use that or create access key
112-
1.In the AWS Console search bar, type "IAM"
113-
Click on "IAM" service
109+
1.In the AWS Console search bar, Click on "IAM" service
114110
2.In the left sidebar, click "Users"
115-
Find and click on your username
116-
Click on the "Security credentials" tab
117-
Scroll down to "Access keys" section
118-
3. Click "Create access key"
119-
4. Choose use case:
120-
**"Command Line Interface (CLI)"** - for development
121-
**"Local code"** - for applications
111+
- Find and click on your username
112+
- Click on the "Security credentials" tab
113+
- Scroll down to "Access keys" section
114+
3.Click "Create access key"
115+
4.Choose use case:
116+
- **"Command Line Interface (CLI)"** - for development
117+
- **"Local code"** - for applications
122118
5. Click "Next"
123119
6. Add description (optional): "Development Environment"
124120
7. Click "Create access key"
125-
8.Click "Download .csv file" to save both keys
126-
```bash
121+
8.Click "Download .csv file" to save both keys
122+
123+
### In VScode Terminal run this script
127124
aws configure
128125

129-
### Test Build Process
130-
```bash
131-
# Test publish script help
126+
# Step 6: Run Publish Script
127+
## Test Build Process
128+
### Test publish script help
132129
./publish.sh --help
133130

134-
# Test build (this will take 10-15 minutes)
135-
./publish.sh bucket_name build-test us-east-1
136-
```
131+
### Test build (this will take 10-15 minutes)
132+
./publish.sh bucket_name build-test us-east-1

0 commit comments

Comments
 (0)