quickstart.md 5.49 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

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:


### Set Environment Variables

atchernych's avatar
atchernych committed
70
Our examples use the [`nvcr.io`](https://nvcr.io/nvidia/ai-dynamo/) but you can setup your own values if you use another docker registry.
71

72
```bash
73
74
75
76
77
78
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
79
80
81
82
83
84
85
86
87
88
89
### 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

90
```bash
atchernych's avatar
atchernych committed
91
92
93
94
95
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
96
97
98
99
```

### Install Dynamo Cloud

atchernych's avatar
atchernych committed
100
101
102
You need to build and push the Dynamo Cloud Operator Image by running

```bash
103
104
cd deploy/cloud/operator
earthly --push +docker --DOCKER_SERVER=$DOCKER_SERVER --IMAGE_TAG=$IMAGE_TAG
atchernych's avatar
atchernych committed
105
106
107
108
```

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

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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}
```

124
125
126
127
128
129
You need to add the bitnami helm repository by running:

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

130
131
132
133
134
135
136
137
138
139
```bash
./deploy.sh --crds
```

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

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

140
141
142
**Installing CRDs manually  (alternative to the script deploy.sh)**

***Step 1: Install Custom Resource Definitions (CRDs)**
143
144
145
146
147
148
149
150

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

151
***Step 2: Build Dependencies and Install Platform**
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

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

175
176
177
178
179
180
181
## Uninstall CRDs for a clean start

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

```bash
./uninstall.sh
```
182
183
184

## Explore Examples

185
186
If deploying to Kubernetes, create a Kubernetes secret containing your sensitive values if needed:

187
```bash
188
189
190
191
export HF_TOKEN=your_hf_token
kubectl create secret generic hf-token-secret \
  --from-literal=HF_TOKEN=${HF_TOKEN} \
  -n ${NAMESPACE}
192
193
```

194
195
Follow the [Examples](../../examples/README.md)
For more details on how to create your own deployments follow [Create Deployment Guide](create_deployment.md)