Last active
February 25, 2025 23:58
-
-
Save colossus06/7e7d95a866b541276b5027866a4bb52f to your computer and use it in GitHub Desktop.
Kubernetes-fresh-install-on-wsl-cgroupv2 for quantum dev environment
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
#install Ubuntu-24.04 | |
wsl --list --verbose | |
wsl --install -d Ubuntu-24.04 | |
wsl #and set the user and psw | |
sudo apt update && sudo apt upgrade -y | |
# on vs code | |
#F1 and Remote-SSH: Connect to Host | |
#install the rest | |
#docker and update | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install -y curl wget apt-transport-https ca-certificates gnupg lsb-release software-properties-common conntrack jq | |
sudo apt install -y docker.io | |
sudo usermod -aG docker $USER | |
newgrp docker | |
docker ps | |
#minikube | |
curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-amd64 | |
sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64 | |
minikube version | |
#kubectl | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
chmod +x kubectl | |
mkdir -p ~/.local/bin | |
mv ./kubectl ~/.local/bin/kubectl | |
kubectl version --client | |
#kubectl autocompletion | |
sudo apt-get install -y bash-completion | |
source /usr/share/bash-completion/bash_completion | |
echo 'source <(kubectl completion bash)' >>~/.bashrc | |
echo 'complete -o default -F __start_kubectl k' >>~/.bashrc | |
source ~/.bashrc | |
#gh | |
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \ | |
&& sudo mkdir -p -m 755 /etc/apt/keyrings \ | |
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \ | |
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ | |
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ | |
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | |
&& sudo apt update \ | |
&& sudo apt install gh -y | |
sudo apt update | |
sudo apt install gh | |
gh auth login | |
#aliases | |
echo 'alias k="kubectl"' >> ~/.bashrc | |
echo 'alias h="helm"' >> ~/.bashrc | |
echo 'alias m="minikube"' >> ~/.bashrc | |
source ~/.bashrc | |
#qiskit | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install qiskit | |
pip install qiskit-ibm-runtime | |
pip install qiskit[visualization] | |
pip install jupyter | |
jupyter notebook ./notebook.ipynb | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment