quickstart.md 4.12 KB
Newer Older
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
# Quickstart

Before deploying your inference graphs you need to install the Dynamo Inference Platform and the Dynamo Cloud.

## 1. Installing from Published Artifacts

Use this approach when installing from pre-built helm charts and docker images published to NGC.

### Prerequisites

```bash
export NAMESPACE=dynamo-cloud
export RELEASE_VERSION=0.3.2
```

Install `envsubst`, `kubectl`, `helm`

### Authenticate with NGC

```bash
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia --username='$oauthtoken' --password=<YOUR_NGC_CLI_API_KEY>
```

### Fetch Helm Charts

```bash
# Fetch the CRDs helm chart
helm fetch https://helm.ngc.nvidia.com/nvidia/charts/dynamo-crds-v${RELEASE_VERSION}.tgz

# Fetch the platform helm chart
helm fetch https://helm.ngc.nvidia.com/nvidia/charts/dynamo-platform-v${RELEASE_VERSION}.tgz
```

### Install Dynamo Cloud

**Step 1: Install Custom Resource Definitions (CRDs)**

```bash
helm install dynamo-crds dynamo-crds-v${RELEASE_VERSION}.tgz \
  --namespace default \
  --wait \
  --atomic
```

**Step 2: Install Dynamo Platform**

```bash
kubectl create namespace ${NAMESPACE}

helm install dynamo-platform dynamo-platform-v${RELEASE_VERSION}.tgz --namespace ${NAMESPACE}
```

## 2. Installing from Source

Use this approach when developing or customizing Dynamo as a contributor, or using local helm charts from the source repository.

### Prerequisites

Ensure you have the source code checked out and are in the `dynamo` directory:

```bash
cd deploy/cloud/helm/
```

### Set Environment Variables

```bash
export NAMESPACE=dynamo-cloud
export DOCKER_USERNAME=your-username
export DOCKER_PASSWORD=your-password
export DOCKER_SERVER=your-docker-registry.com
export IMAGE_TAG=your-image-tag
```

75
76
The operator image will be pulled from `$DOCKER_SERVER/dynamo-operator:$IMAGE_TAG`.

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
### Install Dynamo Cloud

You could run the `deploy.sh` or use the manual commands under Step 1 and Step 2.

**Installing with a script (alternative to the Step 1 and Step 2)**

Create the namespace and the docker registry secret.

```bash
kubectl create namespace ${NAMESPACE}
kubectl create secret docker-registry docker-imagepullsecret \
  --docker-server=${DOCKER_SERVER} \
  --docker-username=${DOCKER_USERNAME} \
  --docker-password=${DOCKER_PASSWORD} \
  --namespace=${NAMESPACE}
```

94
95
96
97
98
99
You need to add the bitnami helm repository by running:

```bash
helm repo add bitnami https://charts.bitnami.com/bitnami
```

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
```bash
./deploy.sh --crds
```

if you want guidance during the process, run the deployment script with the `--interactive` flag:

```bash
./deploy.sh --crds --interactive
```

**Step 1: Install Custom Resource Definitions (CRDs)**

```bash
helm install dynamo-crds ./crds/ \
  --namespace default \
  --wait \
  --atomic
```

**Step 2: Build Dependencies and Install Platform**

```bash
helm dep build ./platform/

kubectl create namespace ${NAMESPACE}

# Create docker registry secret
kubectl create secret docker-registry docker-imagepullsecret \
  --docker-server=${DOCKER_SERVER} \
  --docker-username=${DOCKER_USERNAME} \
  --docker-password=${DOCKER_PASSWORD} \
  --namespace=${NAMESPACE}

# Install platform
helm install dynamo-platform ./platform/ \
  --namespace ${NAMESPACE} \
  --set "dynamo-operator.controllerManager.manager.image.repository=${DOCKER_SERVER}/dynamo-operator" \
  --set "dynamo-operator.controllerManager.manager.image.tag=${IMAGE_TAG}" \
  --set "dynamo-operator.imagePullSecrets[0].name=docker-imagepullsecret"
```

[More on Deploying to Dynamo Cloud](./dynamo_cloud.md)


## Explore Examples

### Hello World

For a basic example that doesn't require a GPU, see the [Hello World](../../examples/hello_world.md)

### LLM

Create a Kubernetes secret containing your sensitive values if needed:

```bash
export HF_TOKEN=your_hf_token
kubectl create secret generic hf-token-secret \
  --from-literal=HF_TOKEN=${HF_TOKEN} \
  -n ${NAMESPACE}
```


Pick your deployment destination.

If local

```bash
export DYNAMO_CLOUD=http://localhost:8080
```

If kubernetes
```bash
export DYNAMO_CLOUD=https://dynamo-cloud.nvidia.com
```

```bash
# Go to your main dynamo directory.
cd ../../../
kubectl apply -f examples/llm/deploy/agg.yaml -n $NAMESPACE
```