quickstart.md 5.41 KB
Newer Older
1
2
# Quickstart

3
4
5
6
7
Your onboarding includes 2 steps.
1. Before deploying your inference graphs you need to install the Dynamo Inference Platform and the Dynamo Cloud.
Dynamo Cloud acts as an orchestration layer between the end user and Kubernetes, handling the complexity of deploying your graphs for you.
You could install from [Published Artifacts](#1-installing-dynamo-cloud-from-published-artifacts) or [Source](#2-installing-dynamo-cloud-from-source)
2. Once you install the Dynamo Cloud, proceed to the [Examples](../../examples/README.md) to deploy an inference graph.
8

9
## 1. Installing Dynamo Cloud from Published Artifacts
10
11
12
13
14
15
16
17
18
19
20
21
22
23

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

24
25
Go to  https://ngc.nvidia.com/org to get your NGC_CLI_API_KEY.

26
27
28
29
30
31
32
33
```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
34
helm fetch https://helm.ngc.nvidia.com/nvidia/ai-dynamo/charts/dynamo-crds-${RELEASE_VERSION}.tgz
35
36

# Fetch the platform helm chart
37
helm fetch https://helm.ngc.nvidia.com/nvidia/ai-dynamo/charts/dynamo-platform-${RELEASE_VERSION}.tgz
38
39
40
41
42
43
44
```

### Install Dynamo Cloud

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

```bash
45
helm install dynamo-crds dynamo-crds-${RELEASE_VERSION}.tgz \
46
47
48
49
50
51
52
53
54
55
  --namespace default \
  --wait \
  --atomic
```

**Step 2: Install Dynamo Platform**

```bash
kubectl create namespace ${NAMESPACE}

56
helm install dynamo-platform dynamo-platform-${RELEASE_VERSION}.tgz --namespace ${NAMESPACE}
57
58
```

59
## 2. Installing Dynamo Cloud from Source
60
61
62
63
64
65
66
67
68
69
70
71
72

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

73
74
Our examples use the `nvcr.io` but you can setup your own values if you use another docker registry.

75
```bash
76
77
78
79
80
81
export NAMESPACE=dynamo-cloud # or whatever you prefer.
export DOCKER_SERVER=nvcr.io/nvidia/ai-dynamo/  # your-docker-registry.com
export DOCKER_USERNAME='$oauthtoken'  # your-username if not using nvcr.io
export DOCKER_PASSWORD=YOUR_NGC_CLI_API_KEY  # your-password if not using nvcr.io
```

atchernych's avatar
atchernych committed
82
83
84
85
86
87
88
89
90
91
92
### Pick the Dynamo Inference Image

Export the tag of the Dynamo Runtime Image.
If you are using a pre-defined release:

```bash
export IMAGE_TAG=RELEASE_VERSION # i.e. 0.3.2 - the release you are using
```

Or build your own image first and tag it with IMAGE_TAG

93
```bash
atchernych's avatar
atchernych committed
94
95
96
97
98
export IMAGE_TAG=<your-pick>
./container/build.sh
docker tag dynamo:latest-vllm <your-registry>/dynamo-base:$IMAGE_TAG
docker login <your-registry>
docker push <your-registry>/dynamo-base:latest-vllm
99
100
```

atchernych's avatar
atchernych committed
101
102
[More on image building](../../../../README.md)

103

104
105
### Install Dynamo Cloud

atchernych's avatar
atchernych committed
106
107
108
109
110
111
112
113
You need to build and push the Dynamo Cloud Operator Image by running

```bash
earthly --push +all-docker --DOCKER_SERVER=$DOCKER_SERVER --IMAGE_TAG=$IMAGE_TAG
```

The  Nvidia Cloud Operator image will be pulled from the `$DOCKER_SERVER/dynamo-operator:$IMAGE_TAG`.

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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}
```

129
130
131
132
133
134
You need to add the bitnami helm repository by running:

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

135
136
137
138
139
140
141
142
143
144
```bash
./deploy.sh --crds
```

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

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

145
146
147
**Installing CRDs manually  (alternative to the script deploy.sh)**

***Step 1: Install Custom Resource Definitions (CRDs)**
148
149
150
151
152
153
154
155

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

156
***Step 2: Build Dependencies and Install Platform**
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

```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)

180
181
182
183
184
185
186
## Uninstall CRDs for a clean start

We provide a script to uninstall CRDs should you need a clean start.

```bash
./uninstall.sh
```
187
188
189

## Explore Examples

190
191
If deploying to Kubernetes, create a Kubernetes secret containing your sensitive values if needed:

192
```bash
193
194
195
196
export HF_TOKEN=your_hf_token
kubectl create secret generic hf-token-secret \
  --from-literal=HF_TOKEN=${HF_TOKEN} \
  -n ${NAMESPACE}
197
198
```

199
Follow the [Examples](../../examples/README.md)