### NooBaa Installation Output Source: https://github.com/datashim-io/datashim/wiki/Noobaa This is an example of the expected output after running the NooBaa installation script. It confirms the successful download and installation of NooBaa, creation of backing stores and bucket classes, and loading of data to an example bucket. ```bash $ ./examples/noobaa/noobaa_install.sh Downloading NooBaa CLI...done Installing NooBaa... Noobaa pods ready! Installed NooBaa Creating Backing Store Created Backing Store Backingstore ready! Delete Bucket Class Delete Bucket Class Creating Bucket Class Created Bucket Class done Creating test OBC...done Loading data to example bucket...job.batch/example-noobaa-data condition met done ``` -------------------------------- ### Install NooBaa Source: https://github.com/datashim-io/datashim/wiki/Noobaa Execute this script from the root directory of the repository to install NooBaa and load sample data. The installation process includes downloading the NooBaa CLI, installing NooBaa, creating a backing store, and setting up a bucket class. ```bash ./examples/noobaa/noobaa_install.sh ``` -------------------------------- ### Local Kubernetes Cluster Setup Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Command to start a local Kubernetes cluster with required configurations for the CSI driver. ```shell ALLOW_PRIVILEGED=true FEATURE_GATES=CSIPersistentVolume=true,MountPropagation=true RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true" LOG_LEVEL=5 hack/local-up-cluster.sh ``` -------------------------------- ### Install Scheduler with Helm Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Navigate to the scheduler-plugins directory and install the scheduler using Helm. ```bash $ cd $DATASHIM_HOME/examples/scheduling/src/sigs.k8s.io/scheduler-plugins $ helm install cacheaware manifests/install/charts/as-a-second-scheduler/ ``` -------------------------------- ### Start Minikube for Testing Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Starts a Minikube instance with specified memory, CPU, and disk size. This is for testing purposes. ```bash minikube start --memory='6G' --cpus=4 --disk-size='40g' --driver=virtualbox -p rooktest ``` -------------------------------- ### Pod Status After Dataset Creation Example Source: https://github.com/datashim-io/datashim/blob/master/src/dataset-operator/README.md Example output showing pod statuses after a Dataset object has been created. Includes the newly created example-dataset-pod. ```text NAME READY STATUS RESTARTS AGE example-dataset-pod 1/1 Running 0 20s dataset-operator-644f8d854-dct95 1/1 Running 0 3m50s ``` -------------------------------- ### Start Minikube Cluster Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Starts a minikube cluster with specific Kubernetes version and driver. This is a prerequisite for deploying the scheduler plugin. ```bash minikube start --nodes 2 -p scheduler-test --kubernetes-version=v1.21.0 --driver=virtualbox ``` -------------------------------- ### Operator Pod Status Example Source: https://github.com/datashim-io/datashim/blob/master/src/dataset-operator/README.md Example output showing the status of the dataset operator pod. Verifies the operator is running. ```text NAME READY STATUS RESTARTS AGE dataset-operator-644f8d854-dct95 1/1 Running 0 15s ``` -------------------------------- ### Install Rook Ceph Common Configuration Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Applies the common configuration for Rook Ceph. This is a prerequisite for further Rook/Ceph setup. ```bash kubectl create -f common.yaml ``` -------------------------------- ### Install Datashim using Helm Source: https://github.com/datashim-io/datashim/blob/master/docs/index.md Installs Datashim into the 'dlf' namespace using Helm. Ensure the namespace is created if it does not exist. ```bash helm install --namespace=dlf --create-namespace \ datashim datashim/datashim-charts ``` -------------------------------- ### Start Minikube Cluster Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Initiates a Minikube cluster with specified memory, CPU, and disk size. Ensure Docker is available as the driver. ```bash minikube start --memory='10G' --cpus=8 --disk-size='15g' --driver=docker ``` -------------------------------- ### Ceph Cluster Configuration Example Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Example configuration for Ceph cluster storage, specifying nodes and devices. Adjust 'storage.nodes' and 'devices' according to your setup. ```yaml storage: useAllNodes: false useAllDevices: false nodes: - name: "minikube" devices: - name: "sdb" config: storeType: bluestore osdsPerDevice: "1" ``` -------------------------------- ### Deploy Example Nginx Application Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Command to deploy an example Nginx application that uses the CSI NFS driver. Ensure NFS server and share information are updated in the YAML file. ```shell kubectl -f examples/kubernetes/nginx.yaml create ``` -------------------------------- ### Deploy Minio and Datashim Components Source: https://github.com/datashim-io/datashim/wiki/Archive-based-Datasets Install Minio and other Datashim components using make and kubectl. Ensure you are in the 'dlf' namespace. ```bash make deployment kubectl apply -n dlf -f examples/minio/ ``` -------------------------------- ### Install Datashim using Helm Source: https://github.com/datashim-io/datashim/blob/master/README.md Installs Datashim using a specified version from the Helm repository into the 'dlf' namespace, creating the namespace if it does not exist. ```bash helm install --namespace=dlf --create-namespace datashim datashim/datashim-charts --version ``` -------------------------------- ### Kubernetes E2E Test Setup (Fedora/RHEL) Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Commands to set up permissions for running Kubernetes End-to-End tests on Fedora/RHEL clusters. ```shell sudo chown -R $USER:$USER /var/run/kubernetes/ sudo chown -R $USER:$USER /var/lib/kubelet sudo chcon -R -t svirt_sandbox_file_t /var/lib/kubelet ``` -------------------------------- ### Install Hive on Minikube Source: https://github.com/datashim-io/datashim/blob/master/examples/hive/k8s/README.md Execute the make command to install Hive on a Minikube cluster. Ensure Makefile variables like DATASET_NAMESPACE_OPERATOR, DOCKER_REGISTRY_COMPONENTS, and DOCKER_REGISTRY_SECRET are correctly set beforehand. ```bash $ make minikube-install ``` -------------------------------- ### Monitor Datashim Installation Status Source: https://github.com/datashim-io/datashim/wiki/Archive-based-Datasets Watch the status of pods in the 'dlf' namespace to confirm successful installation of all components. ```bash watch kubectl get pods -n dlf ``` -------------------------------- ### Create Example Dataset Source: https://github.com/datashim-io/datashim/blob/master/docs/index.md Create a Datashim Dataset with S3 (COS) configuration. Avoid hardcoding credentials in production; use Secrets instead. ```yaml cat < ``` -------------------------------- ### Test Hive Installation Source: https://github.com/datashim-io/datashim/blob/master/examples/hive/k8s/README.md Run the test-hive.sh script to verify the Hive installation. Modify the namespace and repository variables within the script as needed before execution. ```bash $ ./test-hive.sh ``` -------------------------------- ### Setup Ceph Cluster with CSI-LVM Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Shell script to set up a Ceph cluster using CSI-LVM on specified nodes. It will uninstall previous installations if run without arguments. ```bash cd plugins/ceph-cache-plugin/deploy/rook && \ ./setup_ceph_cluster.sh nodename1 ... ``` -------------------------------- ### Create Rook Ceph Common and Operator Resources Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Installs the common configuration and operator for Rook Ceph. Ensure you are in the correct directory. ```bash kubectl create -f common.yaml kubectl create -f operator.yaml ``` -------------------------------- ### Configure and Install Ceph Keys Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Executes a script to set up Ceph registry credentials. Replace placeholders with your actual Docker registry details. ```bash ./keys-installation.sh ``` -------------------------------- ### Create Datashim Namespace Source: https://github.com/datashim-io/datashim/blob/master/README.md Creates the 'dlf' namespace for Datashim installation if it doesn't exist. ```bash kubectl create ns dlf ``` -------------------------------- ### Create Storage Class Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Create a storage class resource that defines how storage should be provisioned. This example assumes a storage class named 'csi-s3' is defined in storageclass.yaml. ```bash kubectl create -f storageclass.yaml ``` -------------------------------- ### Create S3 Dataset Example Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Defines and creates an S3 dataset using a Kubernetes Dataset resource. Replace placeholders with your S3 credentials and endpoint. ```yaml apiVersion: com.ie.ibm.hpsys/v1alpha1 kind: Dataset metadata: name: example-dataset spec: local: type: "COS" accessKeyID: "{AWS_ACCESS_KEY_ID}" secretAccessKey: "{AWS_SECRET_ACCESS_KEY}" endpoint: "{S3_SERVICE_URL}" bucket: "{BUCKET_NAME}" region: "" #it can be empty ``` -------------------------------- ### Dataset with Automatic Bucket Provisioning Source: https://github.com/datashim-io/datashim/blob/master/docs/user-guide.md Configure a Dataset to have Datashim automatically create the referenced bucket. This simplifies setup by managing bucket lifecycle. ```yaml apiVersion: datashim.io/v1alpha1 kind: Dataset metadata: name: my-dataset spec: local: provision: "true" # <---- bucket: my-bucket endpoint: http://my-s3-endpoint secret-name: my-dataset-secret type: COS ``` -------------------------------- ### Verify Deployment Status Source: https://github.com/datashim-io/datashim/wiki/Installation Check the status of deployed components to ensure successful installation. All components should be in a 'Running' state. ```bash NAME READY STATUS RESTARTS AGE csi-attacher-nfsplugin-0 2/2 Running 0 78s csi-attacher-s3-0 1/1 Running 0 78s csi-nodeplugin-nfsplugin-j4ljv 2/2 Running 0 78s csi-provisioner-s3-0 1/1 Running 0 78s csi-s3-2gwcs 2/2 Running 0 79s dataset-operator-76f795587-cljfm 1/1 Running 0 77s generate-keys-q8s99 0/1 Completed 0 67s ``` -------------------------------- ### Configure and Install Ceph Cluster Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Applies the cluster configuration for Rook Ceph. Ensure the `YOUR_REGISTRY` placeholder is replaced. ```bash kubectl create -f cluster.yaml ``` -------------------------------- ### Successful Hive Installation Verification Source: https://github.com/datashim-io/datashim/blob/master/examples/hive/k8s/README.md Check for an 'HTTP/1.1 200 OK' response after running the test script. This indicates a successful installation and allows verification via the Hive landing page URL in a browser. ```text HTTP/1.1 200 OK ``` -------------------------------- ### Verify Rados Gateway Pod Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Lists pods in the rook-ceph namespace to confirm the Rados Gateway pod is starting up after the caching plugin deployment. ```bash rook-ceph-rgw-test-a-77f78b7b69-z5kp9 1/1 Running 0 4m43s ``` -------------------------------- ### Build Model Container Image Source: https://github.com/datashim-io/datashim/wiki/Kubeflow-Model-Storing-and-Serving-with-DLF Builds a Docker image for the MNIST model and pushes it to a container registry. Ensure you have Docker installed and are logged into your registry. ```bash cd examples/kubeflow docker build -t {MY-REGISTRY}/mnist-model -f Dockerfile.model . docker push {MY-REGISTRY}/mnist-model ``` -------------------------------- ### Configure Go GOPATH in VSCode Source: https://github.com/datashim-io/datashim/blob/master/docs/GolangVSCodeGit.md Add these settings to your VSCode JSON configuration to inform the Go extension about your Go installation directory and your custom development workspace. ```json "go.toolsGopath": "$HOME/go", "go.gopath": "$HOME/goprojects" ``` -------------------------------- ### Create S3 Dataset Example Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Defines an S3 dataset using the Dataset CRD. Replace placeholder values with your actual AWS credentials and S3 endpoint. ```yaml apiVersion: datashim.io/v1alpha1 kind: Dataset metadata: name: example-dataset spec: local: type: "COS" accessKeyID: "{AWS_ACCESS_KEY_ID}" secretAccessKey: "{AWS_SECRET_ACCESS_KEY}" endpoint: "{S3_SERVICE_URL}" bucket: "{BUCKET_NAME}" region: "" #it can be empty ``` -------------------------------- ### Configure Nooba for Datashim Hive Source: https://github.com/datashim-io/datashim/blob/master/examples/hive/sampleapp/README.md Set environment variables for Nooba as your Object Storage provider. Ensure S3_ENDPOINT is unset and NOOBAA_HOME is set to your Nooba installation path. ```bash $ unset S3_ENDPOINT $ export NOOBAA_HOME="path/to/noobaa/installation" ``` -------------------------------- ### Create Datashim Demo Namespace Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/a-b-testing/README.md Creates a Kubernetes namespace named 'datashim-demo' and sets it as the current context. ```command-line kubectl create namespace datashim-demo kubectl config set-context --current --namespace=datashim-demo ``` -------------------------------- ### Clone Repository and Deploy Source: https://github.com/datashim-io/datashim/wiki/Installation Clone the dataset lifecycle framework repository and execute the deployment command. ```bash git clone https://github.com/IBM/dataset-lifecycle-framework.git cd dataset-lifecycle-framework make deployment ``` -------------------------------- ### Execute Datashim Hive Sample Application Source: https://github.com/datashim-io/datashim/blob/master/examples/hive/sampleapp/README.md Run the sample application script after configuring your environment and Docker registry. This will create a dataset, mount it, and display a CSV file. ```bash $ ./run_sample.sh ``` -------------------------------- ### Dataset Custom Resource Definition Example Source: https://github.com/datashim-io/datashim/blob/master/src/dataset-operator/README.md An example of a Dataset Custom Resource Definition (CRD) object. This defines a dataset with its type and configuration. ```yaml apiVersion: datashim.io/v1alpha1 kind: Dataset metadata: name: example-dataset spec: # Add fields here type: COS conf: onefield: valueaa anotherfield: bb ``` -------------------------------- ### Deploy Dataset Lifecycle Framework (DLF) Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Builds and deploys the DLF using its Makefile. This command should be run from the root of the DLF directory. ```bash make deployment ``` -------------------------------- ### Create Dataset Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Create a dataset using the provided YAML file after the plugin is deployed. ```bash kubectl create -f my-dataset.yaml ``` -------------------------------- ### Get CSI S3 Source Code Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Download the CSI S3 source code using go get. This is a prerequisite for building the driver from source. ```bash go get -u github.com/ctrox/csi-s3 ``` -------------------------------- ### Create Dataset Description for NooBaa Source: https://github.com/datashim-io/datashim/wiki/Noobaa Run this helper script to generate a Dataset yaml file for NooBaa. The script uses a template and populates it with connection details for NooBaa, creating a file named 'dataset-noobaa.yaml'. ```bash ./examples/noobaa/create_dataset_desc.sh ``` -------------------------------- ### Inspect Mounted Dataset in Pod Source: https://github.com/datashim-io/datashim/wiki/Archive-based-Datasets Execute into a running pod and inspect the contents of the mounted dataset at '/mnt/datasets/example-dataset/'. ```bash $ kubectl exec -it nginx /bin/bash root@nginx:/# ls /mnt/datasets/example-dataset/ noaa-weather-data-jfk-airport root@nginx:/# ls /mnt/datasets/example-dataset/noaa-weather-data-jfk-airport/ LICENSE.txt README.txt clean_data.py jfk_weather.csv jfk_weather_cleaned.csv ``` -------------------------------- ### Tag and Load Scheduler Images Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Tag Docker images for the scheduler and controller, then load them into Minikube. ```bash $ docker tag localhost:5000/scheduler-plugins/kube-scheduler:latest datashim-test/kube-scheduler:cacheaware $ docker tag localhost:5000/scheduler-plugins/controller:latest datashim-test/controller:cacheaware $ minikube image load datashim-test/kube-scheduler:cacheaware $ minikube image load datashim-test/controller:cacheaware ``` -------------------------------- ### Get NodeID using CSC Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Retrieve the Node ID of the CSI driver using the csc tool. ```shell csc node get-id --endpoint tcp://127.0.0.1:10000 ``` -------------------------------- ### Configure and Install Ceph Operator Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Applies the operator configuration for Rook Ceph. Ensure the `YOUR_REGISTRY` placeholder is replaced. ```bash kubectl create -f operator.yaml ``` -------------------------------- ### Create Test Pod Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Deploy a test pod that mounts the PVC created earlier. This verifies that the CSI driver can successfully provision and attach the volume. ```bash kubectl create -f poc.yaml ``` -------------------------------- ### Get Plugin Info using CSC Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Retrieve information about the NFS CSI plugin using the csc tool. ```shell csc identity plugin-info --endpoint tcp://127.0.0.1:10000 ``` -------------------------------- ### Build NFS Plugin Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Build the NFS plugin using the make command. ```shell make nfs ``` -------------------------------- ### Deploy MinIO Instance for Archive Datasets Source: https://github.com/datashim-io/datashim/blob/master/docs/user-guide.md Command to apply a MinIO instance configuration, which automatically creates a 'minio-conf' secret required for archive Datasets. ```bash kubectl apply -n dlf -f https://github.com/datashim-io/datashim/raw/master/examples/minio/minio.yaml ``` -------------------------------- ### Add Datashim Helm Repository Source: https://github.com/datashim-io/datashim/blob/master/docs/index.md Adds the Datashim Helm repository to your local Helm configuration. This is a prerequisite for installing Datashim using Helm. ```bash helm repo add datashim https://datashim-io.github.io/datashim/ helm repo update ``` -------------------------------- ### Create Pod Using NooBaa Dataset Source: https://github.com/datashim-io/datashim/wiki/Noobaa This Kubernetes Pod definition mounts the 'example-dataset' created from NooBaa into the Nginx container at '/mnt/datasets/example-dataset'. Changes made within this directory in the pod will be reflected in the NooBaa bucket. ```yaml apiVersion: v1 kind: Pod metadata: name: nginx labels: dataset.0.id: "example-dataset" dataset.0.useas: "mount" spec: containers: - name: nginx image: nginx ``` -------------------------------- ### Check Provisioner Logs Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Troubleshoot PVC creation issues by checking the logs of the CSI provisioner. This can provide insights into errors during volume provisioning. ```bash kubectl logs -l app=csi-provisioner-s3 -c csi-s3 ``` -------------------------------- ### Apply TGI Pod and Service Manifest Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/README.md Apply the Kubernetes manifest to create the TGI pod and its associated service. ```bash kubectl apply -f tgi+service.yaml ``` -------------------------------- ### Apply MinIO Deployment Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/a-b-testing/README.md Applies the MinIO deployment configuration. This is an optional step for setting up a local object storage endpoint. ```command-line kubectl create namespace minio kubectl apply -f minio.yaml kubectl wait pod --for=condition=Ready -n minio --timeout=-1s minio ``` -------------------------------- ### Create a Dataset Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Define and apply a Dataset resource using kubectl. Ensure you replace placeholders like '', '', and '' with your actual values. ```yaml --- apiVersion: datashim.io/v1alpha1 kind: Dataset metadata: name: example-dataset spec: local: type: "COS" secret-name: "" endpoint: "" bucket: "" ``` -------------------------------- ### Create Tensorboard Deployment using kubectl Source: https://github.com/datashim-io/datashim/wiki/Kubeflow-Model-Storing-and-Serving-with-DLF Command to create the Tensorboard deployment and associated resources in your Kubernetes namespace. ```bash kubectl create -f tensorboard.yaml -n {my-namespace} ``` -------------------------------- ### Create and Verify Dataset Internal and PVC Source: https://github.com/datashim-io/datashim/blob/master/docs/Ceph-Caching.md Commands to create an S3 dataset and then verify its creation by checking the 'datasetsinternal' and PVC resources. ```bash kubectl create -f my-dataset.yaml kubectl get datasetsinternal kubectl get pvc ``` -------------------------------- ### Create TGI Deployments Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/simple-testing/README.md Applies the TGI deployment configuration to both the 'production' and 'staging' namespaces. This deploys the Text Generation Inference server for serving AI models. ```bash kubectl apply -n production -f deployment.yaml kubectl apply -n staging -f deployment.yaml ``` -------------------------------- ### Verify Pod Scheduling Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Check the 'NODE' column in the output of 'kubectl get pods -o wide' to confirm that the 'testpod' has been scheduled to the node with the gateway for the cached dataset. ```bash $ kubectl get pods -o wide ``` -------------------------------- ### Unset S3 Endpoint and Export Noobaa Home Source: https://github.com/datashim-io/datashim/blob/master/examples/hive/k8s/README.md Configure ObjectStorage integration by unsetting the S3 endpoint and exporting the Noobaa home directory. Use this when employing the Noobaa install method. ```bash $ unset S3_ENDPOINT $ export NOOBAA_HOME=path/to/Noobaa/directory ``` -------------------------------- ### Create TGI Deployments Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/a-b-testing/README.md Applies Kubernetes configurations to create stable and canary deployments for Text Generation Inference (TGI) models. GPU selection can be configured via nodeSelector. ```command-line kubectl apply -f tgi-stable.yaml kubectl apply -f tgi-canary.yaml ``` ```yaml nodeSelector: nvidia.com/gpu.product: Tesla-T4 ``` -------------------------------- ### Create NooBaa Dataset Source: https://github.com/datashim-io/datashim/wiki/Noobaa Use this kubectl command to create the dataset pointer to the NooBaa bucket using the previously generated YAML file. ```bash kubectl create -f ./examples/noobaa/dataset-noobaa.yaml ``` -------------------------------- ### Wait for Datashim Pods to be Ready Source: https://github.com/datashim-io/datashim/blob/master/README.md Waits until all Datashim pods in the 'dlf' namespace are in a ready state. ```bash kubectl wait --for=condition=ready pods -l app.kubernetes.io/name=datashim -n dlf ``` -------------------------------- ### Create TensorFlow Serving Deployment Source: https://github.com/datashim-io/datashim/wiki/Kubeflow-Model-Storing-and-Serving-with-DLF Command to create the TensorFlow Serving deployment and service. ```bash kubectl create -f tensorflow-serving -n {my-namespace} ``` -------------------------------- ### Create KFServing InferenceService Source: https://github.com/datashim-io/datashim/wiki/Kubeflow-Model-Storing-and-Serving-with-DLF Command to create the KFServing InferenceService YAML definition. ```bash kubectl create -f kfserving-inference.yaml -n {my-namespace} ``` -------------------------------- ### Build CSI S3 Executable Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Build the CSI S3 executable using the make command. This command compiles the Go source code into a runnable binary. ```bash make build ``` -------------------------------- ### Download and Deploy Models to MinIO Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/simple-testing/README.md Applies Kubernetes Jobs to download FLAN-T5 models into the MinIO instance for both production and staging namespaces. It then waits for the download jobs to complete. ```bash kubectl apply -f download-flan-t5-small-to-minio-prod.yaml kubectl wait -n production --for=condition=complete job/download-flan --timeout=-1s kubectl apply -f download-flan-t5-base-to-minio-staging.yaml kubectl wait -n staging --for=condition=complete job/download-flan --timeout=-1s ``` -------------------------------- ### Create Production and Staging Namespaces Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/simple-testing/README.md Creates the 'production' and 'staging' namespaces in Kubernetes. These namespaces will be used to isolate different environments for model development. ```bash kubectl create namespace production kubectl create namespace staging ``` -------------------------------- ### Clone and Checkout Archive Branch Source: https://github.com/datashim-io/datashim/wiki/Archive-based-Datasets Clone the dataset-lifecycle-framework repository and checkout the 'archive' branch. ```bash git clone https://github.com/IBM/dataset-lifecycle-framework.git cd dataset-lifecycle-framework git checkout archive ``` -------------------------------- ### Compile Scheduler Plugin Image Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Compiles the scheduler plugin code and builds a local Docker image. Ensure GOPATH is set correctly before running. ```bash export GOPATH=$DATASHIM_HOME/examples/scheduling/src/sigs.k8s.io/scheduler-plugins make local-image ``` -------------------------------- ### Download FLAN-T5 Model to MinIO Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/README.md Applies a Kubernetes Job to download the FLAN-T5-Base model from Hugging Face and copy it into the specified Datashim Dataset mount path in MinIO. Waits for the job to complete. ```command-line kubectl apply -f download-flan-t5-base-to-minio.yaml kubectl wait --for=condition=complete job/download-flan --timeout=-1s ``` -------------------------------- ### Test S3 Mount in Pod Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Execute commands inside the test pod to verify the S3 volume is mounted correctly. This includes checking the mount point and creating a test file. ```bash kubectl exec -ti csi-s3-test-nginx bash $mount | grep fuse $touch /var/lib/www/html/hello_world ``` -------------------------------- ### Monitor TGI Pod Logs Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/README.md Stream the logs from the TGI pod to observe its startup process and identify any potential issues. ```bash kubectl logs -f text-generation-inference ``` -------------------------------- ### Check CSI S3 Driver Logs Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Troubleshoot issues related to container creation or volume mounting by examining the logs of the CSI S3 driver. Ensure the 'MountPropagation' feature gate is enabled. ```bash kubectl logs -l app=csi-s3 -c csi-s3 ``` -------------------------------- ### Download Models to MinIO Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/a-b-testing/README.md Applies Kubernetes Jobs to download FLAN-T5 models to the MinIO instance and waits for their completion. This may take several minutes. ```command-line kubectl apply -f download-flan-t5-small-to-minio.yaml kubectl wait --for=condition=complete job/download-flan-small --timeout=-1s kubectl apply -f download-flan-t5-base-to-minio.yaml kubectl wait --for=condition=complete job/download-flan-base --timeout=-1s ``` -------------------------------- ### Deploy Datashim on Kubernetes/Minikube/kind Source: https://github.com/datashim-io/datashim/blob/master/README.md Applies the Datashim manifest for standard Kubernetes environments. ```bash kubectl apply -f https://raw.githubusercontent.com/datashim-io/datashim/master/release-tools/manifests/dlf.yaml ``` -------------------------------- ### Build E2E Test Binary Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Build the Kubernetes End-to-End test binary for the CSI NFS driver. ```shell make build-tests ``` -------------------------------- ### Create TGI Services Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/simple-testing/README.md Applies the TGI service configuration to both the 'production' and 'staging' namespaces. This creates network endpoints for accessing the deployed TGI models. ```bash kubectl apply -n production -f service.yaml kubectl apply -n staging -f service.yaml ``` -------------------------------- ### Set Up Upstream Remote and Rebase Source: https://github.com/datashim-io/datashim/blob/master/docs/GitWorkflow.md Configure the official Datashim repository as an upstream remote and ensure your local master branch is up-to-date. ```bash $ $> cd $HOME/goprojects/src/datashim $> git remote add upstream https://github.com/datashim-io/datashim $> git remote set-url --push upstream no_push $> git fetch upstream $> git checkout master $> git rebase upstream/master ``` -------------------------------- ### Deploy Datashim Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Deploys Datashim to the Kubernetes cluster. This command should be run from the Datashim root directory. ```bash cd $DATASHIM_HOME && make deployment ``` -------------------------------- ### Describe Dataset Status Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Examine the status of the 'example-dataset', paying attention to the 'Provision.Status' which should be 'OK'. The 'Caching.Status' may show 'Pending' initially. ```bash $ kubectl describe dataset example-dataset ``` -------------------------------- ### Wait for TGI Pod to be Ready Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/README.md Monitor the Kubernetes pod until it reaches the 'Ready' condition. This command will block until the pod is ready. ```bash kubectl wait pod --for=condition=Ready text-generation-inference --timeout=-1s ``` -------------------------------- ### Run CSI S3 Driver Tests Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Execute the end-to-end tests for the CSI S3 driver using the provided Makefile. This command initiates the testing process within a Docker container, which requires S3 storage and a mounter like s3fs. ```bash make test ``` -------------------------------- ### Mount Dataset in a Pod using Labels Source: https://github.com/datashim-io/datashim/blob/master/README.md Configures a pod to mount a defined Dataset by using labels. The Dataset will be available at /mnt/datasets/example-dataset. ```yaml apiVersion: v1 kind: Pod metadata: name: nginx labels: dataset.0.id: "example-dataset" dataset.0.useas: "mount" spec: containers: - name: nginx image: nginx ``` -------------------------------- ### Wait for TGI Deployments to be Ready Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/a-b-testing/README.md Waits for the stable and canary Text Generation Inference (TGI) pods to reach a Ready state. ```command-line kubectl wait pod -l run=text-generation-inference -l type=stable --for=condition=Ready --timeout=-1s kubectl wait pod -l run=text-generation-inference -l type=canary --for=condition=Ready --timeout=-1s ``` -------------------------------- ### View Scheduler Pod Logs Source: https://github.com/datashim-io/datashim/blob/master/examples/scheduling/README.md Inspect the logs of the scheduler plugin pod to verify the scheduling decisions, including dataset caching status and node assignments. ```bash $ kubectl logs -n scheduler-plugins scheduler-plugins-scheduler-67b979c8db-ml6lm ``` -------------------------------- ### Deploy Datashim on OpenShift Source: https://github.com/datashim-io/datashim/blob/master/README.md Applies the Datashim manifest for OpenShift environments. ```bash kubectl apply -f https://raw.githubusercontent.com/datashim-io/datashim/master/release-tools/manifests/dlf-oc.yaml ``` -------------------------------- ### Label Namespace for Datashim Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/a-b-testing/README.md Labels the 'datashim-demo' namespace with 'monitor-pods-datasets=enabled' to allow Datashim to mount volumes in pods. ```command-line kubectl label namespace datashim-demo monitor-pods-datasets=enabled ``` -------------------------------- ### Create TFJob using kubectl Source: https://github.com/datashim-io/datashim/wiki/Kubeflow-Model-Storing-and-Serving-with-DLF Command to create the TFJob in your specified Kubernetes namespace. ```bash kubectl create -f tfjob.yaml -n {my-namespace} ``` -------------------------------- ### Create Persistent Volume Claim (PVC) Source: https://github.com/datashim-io/datashim/blob/master/src/csi-s3/README.md Create a PVC using the previously defined storage class. This requests a persistent volume from the CSI S3 driver. ```bash kubectl create -f pvc.yaml ``` -------------------------------- ### Launch TFJob with DLF Mounted Dataset Source: https://github.com/datashim-io/datashim/wiki/Kubeflow-Model-Storing-and-Serving-with-DLF Use this YAML to define a TFJob that automatically mounts a specified dataset via DLF. Replace 'your-dataset' with your actual dataset name. ```yaml apiVersion: kubeflow.org/v1 kind: TFJob metadata: name: my-train spec: tfReplicaSpecs: Ps: replicas: 1 template: metadata: labels: dataset.0.id: "your-dataset" dataset.0.useas: "mount" annotations: sidecar.istio.io/inject: "false" spec: serviceAccount: default-editor containers: - name: tensorflow command: - python - /opt/model.py - --tf-model-dir=/mnt/datasets/your-dataset/mnist - --tf-export-dir=/mnt/datasets/your-dataset/mnist/export - --tf-train-steps=200 - --tf-batch-size=100 - --tf-learning-rate=0.1 image: yiannisgkoufas/mnist workingDir: /opt resources: limits: ephemeral-storage: "10Gi" requests: ephemeral-storage: "10Gi" restartPolicy: OnFailure Chief: replicas: 1 template: metadata: labels: dataset.0.id: "your-dataset" dataset.0.useas: "mount" annotations: sidecar.istio.io/inject: "false" spec: serviceAccount: default-editor containers: - name: tensorflow resources: limits: ephemeral-storage: "10Gi" requests: ephemeral-storage: "10Gi" command: - python - /opt/model.py - --tf-model-dir=/mnt/datasets/your-dataset/mnist - --tf-export-dir=/mnt/datasets/your-dataset/mnist/export - --tf-train-steps=200 - --tf-batch-size=100 - --tf-learning-rate=0.1 image: yiannisgkoufas/mnist restartPolicy: OnFailure Worker: replicas: 1 template: metadata: labels: dataset.0.id: "your-dataset" dataset.0.useas: "mount" annotations: sidecar.istio.io/inject: "false" spec: serviceAccount: default-editor containers: - name: tensorflow command: - python - /opt/model.py - --tf-model-dir=/mnt/datasets/your-dataset/mnist - --tf-export-dir=/mnt/datasets/your-dataset/mnist/export - --tf-train-steps=200 - --tf-batch-size=100 - --tf-learning-rate=0.1 image: yiannisgkoufas/mnist workingDir: /opt restartPolicy: OnFailure ``` -------------------------------- ### Search for Intermediate Datashim Helm Releases Source: https://github.com/datashim-io/datashim/blob/master/README.md Searches the Datashim Helm repository for intermediate releases (e.g., alpha, beta) using the --devel flag. ```bash helm search repo datashim --devel ``` -------------------------------- ### Wait for TGI Deployments to be Ready Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/simple-testing/README.md Waits for the Text Generation Inference (TGI) pods to become ready in both the 'production' and 'staging' namespaces. This ensures the TGI servers are operational before proceeding. ```bash kubectl wait pod -n production -l run=text-generation-inference --for=condition=Ready --timeout=-1s kubectl wait pod -n staging -l run=text-generation-inference --for=condition=Ready --timeout=-1s ``` -------------------------------- ### Apply Datashim Dataset Configurations Source: https://github.com/datashim-io/datashim/blob/master/examples/inference-server/simple-testing/README.md Applies Kubernetes configurations for S3 secrets and Datasets in both production and staging environments. This step makes the data accessible via Datashim. ```bash kubectl apply -f s3-secret-prod.yaml kubectl apply -f dataset-prod.yaml kubectl apply -f s3-secret-staging.yaml kubectl apply -f dataset-staging.yaml ``` -------------------------------- ### Verify DLF Pods Source: https://github.com/datashim-io/datashim/wiki/Ceph-Caching Lists pods in the default namespace to confirm the successful deployment of DLF components. ```bash csi-attacher-nfsplugin-0 2/2 Running 0 7s csi-attacher-s3-0 1/1 Running 0 8s csi-nodeplugin-nfsplugin-nqgtl 2/2 Running 0 7s csi-provisioner-s3-0 2/2 Running 0 8s csi-s3-k9b5j 2/2 Running 0 8s dataset-operator-7b8f65f7d4-hg8n5 1/1 Running 0 6s ``` -------------------------------- ### Kubernetes Feature Gates and Runtime Config Source: https://github.com/datashim-io/datashim/blob/master/src/csi-driver-nfs/README.md Enable necessary feature gates and runtime configurations for the CSI driver. Mount propagation requires privileged containers. ```shell FEATURE_GATES=CSIPersistentVolume=true,MountPropagation=true RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true" ```