File size: 2,488 Bytes
6b6699d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Cloud Migration Guide for AgentIC + OpenLane

This guide explains how to move your local AI-to-GDSII flow to a cloud provider (AWS, GCP, Azure, Lambda Labs, or RunPod).

## 1. Hardware Requirements
OpenLane and Local LLMs are resource-intensive. Do not use a "Free Tier" (t2.micro) instance.

*   **CPU**: 4 vCPUs minimum (8 recommended for Place & Route).
*   **RAM**: 16 GB minimum (32 GB recommended).
*   **Storage**: 50 GB SSD minimum (Docker images + PDKs take ~30GB).
*   **GPU**: NVIDIA T4 (16GB VRAM) or better recommended if running Ollama locally.

## 2. Setup Script (Ubuntu 22.04 / 24.04)
Run these commands on your new cloud instance to replicate your environment.

### A. Install System Dependencies
```bash
sudo apt-get update && sudo apt-get install -y \
    docker.io \
    python3-pip \
    python3-venv \
    git \
    make \
    curl \
    iverilog
    
# Add user to docker group (avoids sudo for docker)
sudo usermod -aG docker $USER
newgrp docker
```

### B. Install Ollama (for DeepSeek)
If you have a GPU, install the Nvidia Container Toolkit first. If CPU-only, just run:
```bash
curl -fsSL https://ollama.com/install.sh | sh

# Pull the model
ollama pull deepseek-r1
```

### C. Clone & Setup Your Workspace
```bash
# Clone OpenLane (Infrastructure)
git clone https://github.com/The-OpenROAD-Project/OpenLane.git ~/OpenLane
cd ~/OpenLane
make pull-openlane  # Downloads the heavy Docker images

# Clone AgentIC (Your Logic)
# (Assuming you push your local code to a git repo first)
git clone <YOUR_GITHUB_REPO_URL> ~/AgentIC

# Setup Python Env
cd ~/AgentIC
python3 -m venv agentic_env
source agentic_env/bin/activate
pip install -r requirements.txt
```

## 3. Remote Access
To view your designs (GDSII files) or access the terminal easily, use VS Code Remote - SSH.

1.  In local VS Code: Install "Remote - SSH" extension.
2.  Connect to `ssh user@your-cloud-ip`.
3.  Open the folder `/home/user/AgentIC`.

## 4. Modified Flow for Cloud (Headless)
Since you won't have a GUI window for `klayout` or unnecessary graphics:

1.  Run the build command normally:
    ```bash
    python main.py build --name cloud_adder --desc "8-bit adder"
    ```
2.  **Viewing Results**: Do not try to open KLayout on the server. Instead, use the `scp` command to copy the final GDS file to your local machine:
    ```bash
    # Run this on your LOCAL machine
    scp user@your-cloud-ip:~/OpenLane/designs/cloud_adder/runs/agentrun/results/final/gds/cloud_adder.gds ./
    ```