Skip to content

Commit f19853f

Browse files
ckadnerBluThaitanium
authored andcommitted
Update MLX setup instructions for KF 1.5 (#346)
* Update MLX setup instructions for KF 1.5 Signed-off-by: Christian Kadner <[email protected]> Signed-off-by: BluThaitanium <[email protected]>
1 parent 56a028b commit f19853f

File tree

3 files changed

+41
-14
lines changed

3 files changed

+41
-14
lines changed

docs/install-mlx-on-kind.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ kubectl get pods --all-namespaces
6363
## Deploy MLX (Single-User)
6464

6565
```Bash
66-
git clone https://github.com/IBM/manifests -b v1.4.0-mlx
66+
git clone https://github.com/IBM/manifests -b v1.5-branch
6767
cd manifests
6868

6969
# run the below command two times if the CRDs take too long to provision
@@ -80,7 +80,8 @@ done
8080
kubectl get pods --all-namespaces
8181

8282
# make the MLX UI available to your local browser on http://localhost:3000/
83-
kubectl port-forward -n istio-system svc/istio-ingressgateway 3000:80 &
83+
kubectl wait -n kubeflow --for=condition=ready pod -l service=mlx-ui && \
84+
kubectl port-forward -n istio-system svc/istio-ingressgateway 3000:80 &
8485
```
8586

8687
Now paste the URL http://localhost:3000/login into your browser and proceed to

docs/mlx-setup.md

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Deploy MLX on an existing Kubernetes cluster
22

33
## Prerequisites
4+
45
* An existing Kubernetes cluster:
5-
- **Min version: 1.17**
6+
- **Min version: 1.21**
67
- **Max version: 1.21**
78
* The recommended minimum capacity requirement for MLX are:
89
- **CPUs**: 8 Cores
@@ -19,9 +20,9 @@
1920
mv kustomize /usr/local/bin
2021
```
2122

22-
## Deploy
23+
## Deployment
2324

24-
To deploy the MLX single-user mode on an existing Kubernetes Cluster, clone the MLX manifests and deploy it with Kustomize.
25+
To deploy the MLX **single-user** mode on an existing Kubernetes Cluster, clone the MLX manifests and deploy it with Kustomize.
2526

2627
This MLX deployment includes:
2728
- [Istio](https://istio.io/)
@@ -30,11 +31,33 @@ This MLX deployment includes:
3031
- [Datashim](https://datashim-io.github.io/datashim/) to provide access to S3 and NFS Datasets within pods
3132
- MLX API and UI
3233

34+
**Note:** Before deploying MLX on OpenShift on Fyre, you need to install a persistent
35+
storage provider like [Portworx](https://docs.portworx.com/install-portworx/openshift/)
36+
and set it as the `default` storage class. This is only required to support mounting
37+
Persistent Volumes for Datasets using Datashim.
38+
39+
To deploy MLX on your Kubernetes or OpenShift cluster, first set the `MLX_DEPLOYMENT_TYPE`
40+
environment variable based on your Kubernetes service provider by uncommenting
41+
one of the `export` commands below:
42+
43+
```Shell
44+
# export MLX_DEPLOYMENT_TYPE=mlx-single-ibmcloud # IBM Cloud - Kubernetes
45+
# export MLX_DEPLOYMENT_TYPE=mlx-single-ibmcloud-openshift # IBM Cloud - OpenShift
46+
# export MLX_DEPLOYMENT_TYPE=mlx-single-fyre-openshift # IBM Fyre - OpenShift
47+
48+
echo "MLX deployment type: ${MLX_DEPLOYMENT_TYPE:-"UNDEFINED"}"
49+
```
50+
51+
Then clone the [IBM/manifest](https://github.com/IBM/manifests/tree/v1.5-branch)
52+
repository and apply the manifests to your cluster:
53+
3354
```shell
34-
git clone https://github.com/machine-learning-exchange/manifests -b mlx-single-user
35-
cd manifests
36-
# run the below command two times if the CRDs take too long to provision.
37-
while ! kustomize build example | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
55+
# clone the manifest repo
56+
git clone https://github.com/IBM/manifests -b v1.5-branch && cd manifests
57+
58+
# run the following command twice if the CRDs take too long to provision
59+
while ! kustomize build ${MLX_DEPLOYMENT_TYPE} | \
60+
kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
3861
```
3962

4063
Then access the MLX web page on http://<cluster_node_ip>:30380/mlx/
@@ -44,14 +67,16 @@ This MLX deployment doesn't include or support:
4467
- Multi-user mode
4568
- Istio mutual TLS
4669

47-
To get these features, please install the additional plugins by following the instructions for [MLX deployment an existing Kubeflow cluster](/docs/install-mlx-on-kubeflow.md#deploy-mlx-on-an-existing-kubeflow-cluster).
70+
To get those features, please install the additional plugins by following the instructions for
71+
[MLX deployment an existing Kubeflow cluster](/docs/install-mlx-on-kubeflow.md#deploy-mlx-on-an-existing-kubeflow-cluster).
4872

49-
## Delete the MLX deployment
73+
74+
## Deleting the MLX Deployment
5075

5176
To delete this MLX deployment, run the following commands in the same manifests folder.
5277

53-
```
54-
kustomize build example | kubectl delete -f -
78+
```Shell
79+
kustomize build ${MLX_DEPLOYMENT_TYPE} | kubectl delete -f -
5580
```
5681

5782
## Troubleshooting

docs/mlx-workshop.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ For MLX on KIND we need to make the port available on localhost by running the
202202
following command:
203203

204204
```Bash
205-
kubectl port-forward svc/codenet-language-classification 5000:5000
205+
kubectl wait --for=condition=ready pod -l app=codenet-language-classification && \
206+
kubectl port-forward svc/codenet-language-classification 5000:5000
206207
```
207208

208209
Now we should be able to access the UI page for the deployed model by pasting

0 commit comments

Comments
 (0)