Skip to content

Link to new docs across our gh repo #6448

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

Merged
merged 5 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ make undeploy-k8s

## Documentation

[Seldon Core 2 docs](https://docs.seldon.io/projects/seldon-core/en/v2/)
[Seldon Core 2 docs](https://docs.seldon.ai/seldon-core-2)

## License

[License](LICENSE)
[License](LICENSE)
3 changes: 0 additions & 3 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,4 @@ You may want to also remove cache resources used for the installation with
rm -rf ~/.cache/seldon/
```

```{note}
If you used Ansible to install Seldon Core 2 and its ecosystem into K8s cluster other than Kind you need to manually remove all the components.
Notes on how to remove Seldon Core 2 Helm installation itself you can find [here](https://docs.seldon.io/projects/seldon-core/en/v2/contents/getting-started/kubernetes-installation/helm.html#uninstall).
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% hint style="warning" %}
**Warning**: The Ansible installation of a Seldon Core and associated ecosystem is meant for **dev/testing** purposes.
For production use cases follow [Helm installation](https://docs.seldon.io/projects/seldon-core/en/v2/contents/getting-started/kubernetes-installation/helm.html).
For production use cases follow [Helm installation](https://docs.seldon.ai/seldon-core-2/installation/production-environment).
{% endhint %}

## Installing Ansible
Expand Down Expand Up @@ -241,5 +241,4 @@ rm -rf ~/.cache/seldon/

{% hint style="info" %}
If you used Ansible to install Seldon Core 2 and its ecosystem into K8s cluster other than Kind you need to manually remove all the components.
Notes on how to remove Seldon Core 2 Helm installation itself you can find [here](https://docs.seldon.io/projects/seldon-core/en/v2/contents/getting-started/kubernetes-installation/helm.html#uninstall).
{% endhint %}
2 changes: 1 addition & 1 deletion samples/examples/k8s-pvc/k8s-pvc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"id": "32da65b2",
"metadata": {},
"source": [
"[**Now you should finish the Seldon install following the docs.**](https://docs.seldon.io/projects/seldon-core/en/v2/contents/getting-started/index.html)"
"[**Now you should finish the Seldon install following the docs.**](https://docs.seldon.ai/seldon-core-2/installation/production-environment)"
]
},
{
Expand Down
268 changes: 134 additions & 134 deletions samples/examples/k8s-pvc/k8s-pvc.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
## Kubernetes PVC Example


```python
import os
os.environ["NAMESPACE"] = "seldon-mesh"
```


```python
MESH_IP=!kubectl get svc seldon-mesh -n ${NAMESPACE} -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
MESH_IP=MESH_IP[0]
import os
os.environ['MESH_IP'] = MESH_IP
MESH_IP
```




'172.19.255.1'



### Kind cluster setup

To run this example in Kind we need to start Kind with access to a local folder where are models are location. In this example we will use a folder in `/tmp` and associate that with a path in the container.


```python
!cat kind-config.yaml
```

## Kubernetes PVC Example
```python
import os
os.environ["NAMESPACE"] = "seldon-mesh"
```
```python
MESH_IP=!kubectl get svc seldon-mesh -n ${NAMESPACE} -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
MESH_IP=MESH_IP[0]
import os
os.environ['MESH_IP'] = MESH_IP
MESH_IP
```
'172.19.255.1'
### Kind cluster setup
To run this example in Kind we need to start Kind with access to a local folder where are models are location. In this example we will use a folder in `/tmp` and associate that with a path in the container.
```python
!cat kind-config.yaml
```
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
Expand All @@ -39,33 +39,33 @@ To run this example in Kind we need to start Kind with access to a local folder
- hostPath: /tmp/models
containerPath: /models



To start a Kind cluster with these settings using our ansible script you can run from the project root folder

```
ansible-playbook ansible/playbooks/kind-cluster.yaml -e kind_config_file=${PWD}/samples/examples/local-pvc/kind-config.yaml
```

[**Now you should finish the Seldon install following the docs.**](https://docs.seldon.io/projects/seldon-core/en/v2/contents/getting-started/index.html)

Create the local folder we will use for our models and copy an example iris sklearn model to it.


```python
!mkdir -p /tmp/models
!gsutil cp -r gs://seldon-models/mlserver/iris /tmp/models
```

### Create Server with PVC

Here we create a storage class and associated persistent colume referencing the `/models` folder where our models are stored.


```python
!cat pvc.yaml
```

To start a Kind cluster with these settings using our ansible script you can run from the project root folder
```
ansible-playbook ansible/playbooks/kind-cluster.yaml -e kind_config_file=${PWD}/samples/examples/local-pvc/kind-config.yaml
```
[**Now you should finish the Seldon install following the docs.**](https://docs.seldon.ai/seldon-core-2/installation/production-environment)
Create the local folder we will use for our models and copy an example iris sklearn model to it.
```python
!mkdir -p /tmp/models
!gsutil cp -r gs://seldon-models/mlserver/iris /tmp/models
```
### Create Server with PVC
Here we create a storage class and associated persistent colume referencing the `/models` folder where our models are stored.
```python
!cat pvc.yaml
```
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
Expand Down Expand Up @@ -107,17 +107,17 @@ Here we create a storage class and associated persistent colume referencing the
selector:
matchLabels:
type: local


Now we create a new Server based on the provided MLServer configuration but extend it with our PVC by adding this to the rclone container which will allow rclone to move models from this PVC onto the server.

We also add a new capability `pvc` to allow us to schedule models to this server that has the PVC.


```python
!cat server.yaml
```

Now we create a new Server based on the provided MLServer configuration but extend it with our PVC by adding this to the rclone container which will allow rclone to move models from this PVC onto the server.
We also add a new capability `pvc` to allow us to schedule models to this server that has the PVC.
```python
!cat server.yaml
```
apiVersion: mlops.seldon.io/v1alpha1
kind: Server
metadata:
Expand All @@ -136,17 +136,17 @@ We also add a new capability `pvc` to allow us to schedule models to this server
volumeMounts:
- name: models-pvc
mountPath: /var/models


### SKLearn Model

We use a simple sklearn iris classification model with the added `pvc` requirement so our MLServer with the PVC will be targeted during scheduling.


```python
!cat ./iris.yaml
```

### SKLearn Model
We use a simple sklearn iris classification model with the added `pvc` requirement so our MLServer with the PVC will be targeted during scheduling.
```python
!cat ./iris.yaml
```
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
Expand All @@ -156,29 +156,29 @@ We use a simple sklearn iris classification model with the added `pvc` requireme
requirements:
- sklearn
- pvc



```python
!kubectl create -f iris.yaml -n ${NAMESPACE}
```

```python
!kubectl create -f iris.yaml -n ${NAMESPACE}
```
model.mlops.seldon.io/iris created



```python
!kubectl wait --for condition=ready --timeout=300s model --all -n ${NAMESPACE}
```

```python
!kubectl wait --for condition=ready --timeout=300s model --all -n ${NAMESPACE}
```
model.mlops.seldon.io/iris condition met



```python
!kubectl get model iris -n ${NAMESPACE} -o jsonpath='{.status}' | jq -M .
```

```python
!kubectl get model iris -n ${NAMESPACE} -o jsonpath='{.status}' | jq -M .
```
{
"conditions": [
{
Expand All @@ -194,14 +194,14 @@ We use a simple sklearn iris classification model with the added `pvc` requireme
],
"replicas": 1
}



```python
!seldon model infer iris --inference-host ${MESH_IP}:80 \
'{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}'
```

```python
!seldon model infer iris --inference-host ${MESH_IP}:80 \
'{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}'
```
{
"model_name": "iris_1",
"model_version": "1",
Expand All @@ -225,16 +225,16 @@ We use a simple sklearn iris classification model with the added `pvc` requireme
}
]
}


Do a gRPC inference call


```python
!seldon model infer iris --inference-mode grpc --inference-host ${MESH_IP}:80 \
'{"model_name":"iris","inputs":[{"name":"input","contents":{"fp32_contents":[1,2,3,4]},"datatype":"FP32","shape":[1,4]}]}' | jq -M .
```

Do a gRPC inference call
```python
!seldon model infer iris --inference-mode grpc --inference-host ${MESH_IP}:80 \
'{"model_name":"iris","inputs":[{"name":"input","contents":{"fp32_contents":[1,2,3,4]},"datatype":"FP32","shape":[1,4]}]}' | jq -M .
```
{
"modelName": "iris_1",
"modelVersion": "1",
Expand All @@ -254,17 +254,17 @@ Do a gRPC inference call
}
]
}



```python
!kubectl delete -f ./iris.yaml -n ${NAMESPACE}
```

```python
!kubectl delete -f ./iris.yaml -n ${NAMESPACE}
```
model.mlops.seldon.io "iris" deleted



```python

```
```python
```
Loading