Skip to content

Instantly share code, notes, and snippets.

View azlkiniue's full-sized avatar
:shipit:
Forever a work in progress

Ahmada Yusril azlkiniue

:shipit:
Forever a work in progress
View GitHub Profile
@azlkiniue
azlkiniue / ndtop.py
Last active March 19, 2024 01:37
Script to get list of docker container that used a particular GPU, based on nvitop – https://github.com/XuehaiPan/nvitop
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from typing import Dict
from nvitop import Device, GpuProcess, NA
import docker
from rich.console import Console
from rich.table import Table
from rich import box
docker_client = docker.from_env()
@azlkiniue
azlkiniue / create-read-only-kubeconfig.yaml
Last active April 9, 2024 02:10
Create Read-only Kubernetes Config
apiVersion: v1
kind: ServiceAccount
metadata:
name: read-only-user
secrets:
- name: read-only-secret
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: