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 | |
# Function to check if Kubernetes Dashboard is installed | |
function is_dashboard_installed { | |
kubectl get services --namespace=kubernetes-dashboard | grep kubernetes-dashboard >/dev/null 2>&1 | |
return $? | |
} | |
# Function to check if Service Account and ClusterRoleBinding are installed | |
function is_user_installed { |
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
printf 'FROM scratch\nCOPY . /' | DOCKER_BUILDKIT=1 docker build -f - -o /tmp/docker-context . |
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
https://stackoverflow.com/a/10548919/20335188 | |
# steps to merge child-repo into parent-repo | |
brew install git-filter-repo # will need it later | |
git clone https://github.com/yourusername/child-repo.git | |
cd child-repo | |
git filter-repo --to-subdirectory-filter child-repo # rewrite history to move all files to child-repo folder |
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
# pip install diffusers transformers accelerate | |
# Load model | |
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler | |
import torch | |
repo_id = "stabilityai/stable-diffusion-2" | |
device = "cuda" | |
pipe = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, revision="fp16") |
NewerOlder