This file contains hidden or 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
| import kubernetes | |
| from kubernetes.client.rest import ApiException | |
| import time | |
| import os | |
| # Set the path to the kubeconfig file | |
| #kubeconfig_path = "~/#/config" # "/path/to/your/kubeconfig" | |
| # Set the KUBECONFIG environment variable | |
| #os.environ["KUBECONFIG"] = kubeconfig_path |
This file contains hidden or 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
| #!/bin/bash | |
| # ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ | |
| # ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ | |
| # ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ | |
| # ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
| # ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ | |
| # | |
| # | |
| # This will print SECRETS as PLAIN TEXT to your terminal. |
This file contains hidden or 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
| # Make the script executable | |
| # chmod +x install-tools.sh | |
| # Run the script | |
| # ./install-tools.sh | |
| KUBECTL_VERSION=latest # vX.XX.XX should be atleast +/- 1 version of your kubernetes version | |
| KUBECTL_URL=https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl | |
| KUBECTL_CHECKSUM=https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/amd64/kubectl.sha256 |
This file contains hidden or 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
| export OM_version=openmpp_ubuntu_mpi_20231115 | |
| export model_dir=/home/jovyan/buckets/aaw-unclassified/oncosim/ #<ModelNameHere> | |
| export OM_ROOT=/home/jovyan/buckets/aaw-unclassified/OMPP-1.15.16/openmpp_ubuntu_mpi_20231115 #<PathToOmpp> | |
| cd $model_dir | |
| rm -rf ompp-linux | |
| make OM_MSG_USE=MPI RELEASE=1 all publish |
This file contains hidden or 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
| #!/bin/bash | |
| # List all Kubeflow profiles, get name (profiles are 1:1 with namespaces) | |
| PROFILES=$(kubectl get profiles -o jsonpath='{.items[*].metadata.name}') | |
| # Iterate over each profile and get RoleBindings, extract user name | |
| for ns in $PROFILES; do | |
| echo "Namespace: $ns" | |
| kubectl get rolebindings -n $ns -o json | jq ' | |
| .items[] | select(.subjects[]?.kind == "User") | { |
This file contains hidden or 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
| #!/bin/bash | |
| your_command="ls -l" # --- UPDATE COMMAND HERE --- | |
| start_time=$(date +%s) | |
| eval $your_command | |
| end_time=$(date +%s) | |
| # Calculate the elapsed time in seconds | |
| elapsed_time=$((end_time - start_time)) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ | |
| # ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ | |
| # ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ | |
| # ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
| # ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ | |
| # | |
| # This script can make changes to your cluster resources. Please review and understand it before running. | |
| # It identifies and deletes orphaned StatefulSets in a Kubernetes cluster that are |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # ██ ██ █████ ██████ ███ ██ ██ ███ ██ ██████ | |
| # ██ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ | |
| # ██ █ ██ ███████ ██████ ██ ██ ██ ██ ██ ██ ██ ██ ███ | |
| # ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
| # ███ ███ ██ ██ ██ ██ ██ ████ ██ ██ ████ ██████ | |
| # | |
| # This script can make changes to your cluster resources. Please review and understand it before running. | |
| # It reconciles Notebook-related resources in a Kubernetes cluster by adding owner references to them. |