|
1 |
| -# The NVIDIA NIM Operator |
2 |
| -An Operator for the deployment and maintenance of various NVIDIA NIMs and NeMo microservices in a Kubernetes environment. |
| 1 | +<!-- |
| 2 | + SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 3 | + SPDX-License-Identifier: Apache-2.0 |
| 4 | +--> |
3 | 5 |
|
4 |
| -## Description |
5 |
| -The NVIDIA NIM Operator is a Kubernetes operator designed to facilitate the deployment, management, and scaling of NVIDIA NIMs and related NeMo microservices. The NIM Operator streamlines the integration of these powerful AI capabilities into cloud-native environments such as Kubernetes, leveraging NVIDIA GPUs. |
| 6 | +# NVIDIA NIM Operator |
| 7 | + |
| 8 | +NVIDIA NIM Operator is a Kubernetes Operator that is designed to facilitate the deployment, management, and scaling of NVIDIA NIM microservices on Kubernetes clusters. |
| 9 | + |
| 10 | +NVIDIA NIM microservices deliver AI foundation models as accelerated inference microservices that are portable across data center, workstation, and cloud, accelerating flexible generative AI development, deployment and time to value. |
6 | 11 |
|
7 | 12 | ## Getting Started
|
8 | 13 |
|
9 | 14 | ### Prerequisites
|
10 |
| -- Access to a Kubernetes v1.28+ cluster with supported NVIDIA GPUs |
11 | 15 |
|
12 |
| -### To Deploy on the cluster |
| 16 | +- Kubernetes v1.28 and higher. |
| 17 | +- NVIDIA GPUs that are supported by the NIM microservices to deploy. |
| 18 | + |
| 19 | +### Deploying the Operator on the Cluster |
| 20 | + |
13 | 21 | **Build and push your image to the location specified by `IMG`:**
|
14 | 22 |
|
15 | 23 | ```sh
|
16 |
| -make docker-build docker-push IMG=nvcr.io/nvidia/cloud-native/k8s-nim-operator:v0.1.0 |
| 24 | +make docker-build docker-push IMG=<your-private-registry>/k8s-nim-operator:<tag> |
17 | 25 | ```
|
18 | 26 |
|
19 |
| -**NOTE:** This image ought to be published in the personal registry you specified. |
20 |
| -And it is required to have access to pull the image from the working environment. |
21 |
| -Make sure you have the proper permission to the registry if the above commands don’t work. |
| 27 | +> Publish the image to a personal registry. |
| 28 | +> You must be able to pull the image from the working environment. |
| 29 | +> Make sure you have the proper permission to the registry if the preceding commands result in an error. |
22 | 30 |
|
23 | 31 | **Install the CRDs into the cluster:**
|
24 | 32 |
|
25 | 33 | ```sh
|
26 | 34 | make install
|
27 | 35 | ```
|
28 | 36 |
|
29 |
| -**Deploy the Manager to the cluster with the image specified by `IMG`:** |
| 37 | +**Deploy the manager to the cluster with the image specified by `IMG`:** |
30 | 38 |
|
31 | 39 | ```sh
|
32 |
| -make deploy IMG=nvcr.io/nvidia/cloud-native/k8s-nim-operator:v0.1.0 |
| 40 | +make deploy IMG=<your-private-registry>/k8s-nim-operator:<tag> |
33 | 41 | ```
|
34 | 42 |
|
35 |
| -> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin |
| 43 | +> If you encounter RBAC errors, you might need to grant yourself cluster-admin |
36 | 44 | privileges or be logged in as admin.
|
| 45 | +> Ensure that the samples have default values. |
37 | 46 |
|
38 |
| ->**NOTE**: Ensure that the samples has default values to test it out. |
| 47 | +### Deploying Sample `NIMCache` and `NIMService` Resources |
39 | 48 |
|
40 |
| -### To Deploy a sample `NIMCache` and `NIMService` instance |
| 49 | +Follow the guides in the [docs](./docs) directory to deploy sample CR instances. |
41 | 50 |
|
42 |
| -Follow the guides [here](https://github.com/NVIDIA/k8s-nim-operator/-/tree/main/docs?ref_type=heads) to deploy sample CR instances. |
| 51 | +### Uninstalling the Operator |
43 | 52 |
|
44 |
| -### To Uninstall |
45 | 53 | **Delete the instances (CRs) from the cluster:**
|
46 | 54 |
|
47 | 55 | ```sh
|
48 | 56 | kubectl delete -k config/samples/
|
49 | 57 | ```
|
50 | 58 |
|
51 |
| -**Delete the APIs(CRDs) from the cluster:** |
| 59 | +**Delete the APIs (CRDs) from the cluster:** |
52 | 60 |
|
53 | 61 | ```sh
|
54 | 62 | make uninstall
|
55 | 63 | ```
|
56 | 64 |
|
57 |
| -**UnDeploy the controller from the cluster:** |
| 65 | +**Undeploy the controller from the cluster:** |
58 | 66 |
|
59 | 67 | ```sh
|
60 | 68 | make undeploy
|
61 | 69 | ```
|
62 | 70 |
|
63 | 71 | ## Project Distribution
|
64 | 72 |
|
65 |
| -Following are the steps to build the installer and distribute this project to users. |
| 73 | +Perform the following steps to build the installation manifests and distribute this project to users. |
66 | 74 |
|
67 |
| -1. Build the installer for the image built and published in the registry: |
| 75 | +1. Build the manifests for the image built and published in the registry: |
68 | 76 |
|
69 |
| -```sh |
70 |
| -make build-installer IMG=nvcr.io/nvidia/cloud-native/k8s-nim-operator:v0.1.0 |
71 |
| -``` |
| 77 | + ```sh |
| 78 | + make build-installer IMG=<your-private-registry>/k8s-nim-operator:<tag> |
| 79 | + ``` |
72 | 80 |
|
73 |
| -NOTE: The makefile target mentioned above generates an 'install.yaml' |
74 |
| -file in the dist directory. This file contains all the resources built |
75 |
| -with Kustomize, which are necessary to install this project without |
76 |
| -its dependencies. |
| 81 | + The preceding Makefile target generates a `dist/install.yaml` file. |
| 82 | + This file is built with Kustomize and contains the manifests for the CRDs and resources that are necessary to install this project without |
| 83 | + its dependencies. |
77 | 84 |
|
78 |
| -2. Using the installer |
| 85 | +2. Run the installer: |
79 | 86 |
|
80 |
| -Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.: |
81 |
| - |
82 |
| -```sh |
83 |
| -kubectl apply -f https://raw.githubusercontent.com/<org>/k8s-nim-operator/<tag or branch>/dist/install.yaml |
84 |
| -``` |
| 87 | + ```sh |
| 88 | + kubectl apply -f https://raw.githubusercontent.com/<org>/k8s-nim-operator/<tag or branch>/dist/install.yaml |
| 89 | + ``` |
85 | 90 |
|
86 | 91 | ## Contributing
|
87 |
| -NVIDIA is willing to work with partners for adding platform support for the NIM Operator. The NIM Operator is open-source and permissively licensed under the Apache 2.0 license with only minimal requirements for source code [contributions](#signing). |
| 92 | + |
| 93 | +NVIDIA can work with partners to add platform support for the NIM Operator. |
| 94 | +The NIM Operator is open-source and permissively [licensed](LICENSE.md) with only minimal requirements for source code [contributions](CONTRIBUTING.md). |
88 | 95 |
|
89 | 96 | To get started with building the NIM Operator, follow these steps:
|
90 | 97 |
|
91 | 98 | ```shell
|
92 |
| -$ git clone <nim-operator-repo> |
93 |
| -$ cd k8s-nim-operator |
94 |
| -$ make IMG=<image-name> docker-build |
| 99 | +git clone [email protected]:NVIDIA/k8s-nim-operator .git |
| 100 | +cd k8s-nim-operator |
| 101 | +make IMG=<image-name> docker-build |
95 | 102 | ```
|
96 | 103 |
|
97 |
| -## <a name="signing"></a>Signing your work |
98 |
| - |
99 |
| -Want to hack on the NVIDIA NIM Operator? Awesome! |
100 |
| -We only require you to sign your work, the below section describes this! |
101 |
| - |
102 |
| -The sign-off is a simple line at the end of the explanation for the patch. Your |
103 |
| -signature certifies that you wrote the patch or otherwise have the right to pass |
104 |
| -it on as an open-source patch. The rules are pretty simple: if you can certify |
105 |
| -the below (from [developercertificate.org](http://developercertificate.org/)): |
106 |
| - |
107 |
| -``` |
108 |
| -Developer Certificate of Origin |
109 |
| -Version 1.1 |
110 |
| -
|
111 |
| -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. |
112 |
| -1 Letterman Drive |
113 |
| -Suite D4700 |
114 |
| -San Francisco, CA, 94129 |
115 |
| -
|
116 |
| -Everyone is permitted to copy and distribute verbatim copies of this |
117 |
| -license document, but changing it is not allowed. |
118 |
| -
|
119 |
| -Developer's Certificate of Origin 1.1 |
120 |
| -
|
121 |
| -By making a contribution to this project, I certify that: |
122 |
| -
|
123 |
| -(a) The contribution was created in whole or in part by me and I |
124 |
| - have the right to submit it under the open source license |
125 |
| - indicated in the file; or |
126 |
| -
|
127 |
| -(b) The contribution is based upon previous work that, to the best |
128 |
| - of my knowledge, is covered under an appropriate open source |
129 |
| - license and I have the right under that license to submit that |
130 |
| - work with modifications, whether created in whole or in part |
131 |
| - by me, under the same open source license (unless I am |
132 |
| - permitted to submit under a different license), as indicated |
133 |
| - in the file; or |
134 |
| -
|
135 |
| -(c) The contribution was provided directly to me by some other |
136 |
| - person who certified (a), (b) or (c) and I have not modified |
137 |
| - it. |
138 |
| -
|
139 |
| -(d) I understand and agree that this project and the contribution |
140 |
| - are public and that a record of the contribution (including all |
141 |
| - personal information I submit with it, including my sign-off) is |
142 |
| - maintained indefinitely and may be redistributed consistent with |
143 |
| - this project or the open source license(s) involved. |
144 |
| -``` |
145 |
| - |
146 |
| -Then you just add a line to every git commit message: |
147 |
| - |
148 |
| - Signed-off-by: Joe Smith <[email protected]> |
149 |
| - |
150 |
| -Use your real name (sorry, no pseudonyms or anonymous contributions.) |
151 |
| - |
152 |
| -If you set your `user.name` and `user.email` git configs, you can sign your |
153 |
| -commit automatically with `git commit -s`. |
154 |
| - |
155 |
| -**NOTE:** Run `make help` for more information on all potential `make` targets |
156 |
| - |
157 |
| -More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html) |
158 |
| - |
159 |
| -## License |
160 |
| - |
161 |
| -Copyright 2024. |
162 |
| - |
163 |
| -Licensed under the Apache License, Version 2.0 (the "License"); |
164 |
| -you may not use this file except in compliance with the License. |
165 |
| -You may obtain a copy of the License at |
166 |
| - |
167 |
| - http://www.apache.org/licenses/LICENSE-2.0 |
| 104 | +Run `make help` for more information about additional `make` targets. |
168 | 105 |
|
169 |
| -Unless required by applicable law or agreed to in writing, software |
170 |
| -distributed under the License is distributed on an "AS IS" BASIS, |
171 |
| -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
172 |
| -See the License for the specific language governing permissions and |
173 |
| -limitations under the License. |
| 106 | +More information can be found in the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html). |
0 commit comments