-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs for KIND deployment #266
Merged
mlx-bot
merged 4 commits into
machine-learning-exchange:main
from
ckadner:add_kind_deployment_doc
Dec 2, 2021
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Deploy MLX on KIND | ||
|
||
Kubernetes in Docker (KIND) provides an easy way to deploy MLX locally including | ||
Kubeflow Pipelines which makes it possible to run generated sample pipelines for | ||
any of the registered MLX assets. | ||
|
||
## Installation | ||
|
||
- [Docker](https://docs.docker.com/desktop/#download-and-install) | ||
- [Homebrew](https://brew.sh/) (on macOS) | ||
- [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/) | ||
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) | ||
- [KIND](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) | ||
|
||
|
||
### Install Required CLIs (macOS) | ||
|
||
After installing Docker and Homebrew (linked above) you can install the `kind`, | ||
`kustomize`, and `kubectl` CLI with `brew install`. For Windows and Linux follow | ||
the respective home pages for installation instructions. | ||
|
||
```Bash | ||
brew install kind | ||
kind --version | ||
|
||
brew install kubectl | ||
kubectl version --client | ||
|
||
brew install kustomize | ||
kustomize version | ||
``` | ||
|
||
## Docker Resources | ||
|
||
Increase the default resources for Docker: | ||
|
||
- CPUs: 4 Cores | ||
- Memory: 8 GB RAM | ||
- Disk: 32+ GB | ||
|
||
**Note**: We found that on older laptops, like a 2016 15 in MacBook Pro (2.7 GHz i7, 16 GB) the MLX | ||
deployment on KIND may require to give all available resources to the Docker daemon in order to be | ||
able to deploy the manifests and run basic pipelines. Even then, trying to run notebooks or deploying | ||
a model, will cause the laptop to get very slow with fans running full throttle. It may even cause | ||
other application to crash. | ||
|
||
|
||
## Create KIND Cluster | ||
|
||
```Bash | ||
kind create cluster --name mlx | ||
kubectl cluster-info --context kind-mlx | ||
kubectl get pods --all-namespaces | ||
``` | ||
|
||
|
||
## Deploy MLX (Single-User) | ||
|
||
```Bash | ||
git clone https://github.com/IBM/manifests -b v1.4.0-mlx | ||
cd manifests | ||
|
||
# run the below command two times if the CRDs take too long to provision. | ||
while ! kustomize build mlx-single | \ | ||
kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done | ||
|
||
# check pod status | ||
kubectl get pods --all-namespaces | ||
|
||
# make the MLX UI available to your local browser on http://localhost:3000/ | ||
kubectl port-forward -n istio-system svc/istio-ingressgateway 3000:80 | ||
``` | ||
|
||
Now paste the URL http://localhost:3000/ into your browser and proceed to | ||
[import the MLX catalog](import-assets.md). | ||
|
||
Delete the `mlx` cluster when it is no longer needed: | ||
|
||
```Bash | ||
kind delete cluster --name mlx | ||
``` | ||
|
||
|
||
## Install Kubeflow Pipelines (for reference, optional) | ||
|
||
```Bash | ||
kind create cluster --name kfp | ||
kubectl cluster-info --context kind-kfp | ||
|
||
# env/platform-agnostic-pns hasn't been publically released, so you will install it from master | ||
export PIPELINE_VERSION=1.7.1 | ||
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION" | ||
kubectl wait --for condition=established --timeout=60s crd/applications.app.k8s.io | ||
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/platform-agnostic-pns?ref=$PIPELINE_VERSION" | ||
|
||
kubectl get pods --all-namespaces | ||
|
||
# make the Kubeflow Pipelines UI available on http://localhost:8080/#/pipelines | ||
kubectl port-forward -n kubeflow svc/ml-pipeline-ui 8080:80 | ||
|
||
kind delete cluster --name kfp | ||
``` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need kustomize 3.2 for this manifest. Can you point to the kustomize instruction like the one on ibm kubeflow?
https://www.kubeflow.org/docs/distributions/ibm/deploy/deployment-process/#kubeflow-installation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this para: