Skip to content

Instantly share code, notes, and snippets.

View Neo-X's full-sized avatar

Glen Berseth Neo-X

View GitHub Profile
@vitchyr
vitchyr / git_info.py
Created May 14, 2021 23:15
Save Git Info in Python for Reproducible Experiments
"""
Helper functions to save git information every time you
Requirements:
- GitPython==2.1.12
(Probably works on other GitPython versions, but this is the version I've tested.)
Usage:
```
@andyneff
andyneff / egl_notes.md
Created December 29, 2017 16:54
EGL Notes.md

Gotchas

  • Nvidia Driver 375.39 on ubuntu is broken when it comes to EGL. Follow comment #11 to fix the host machine.
    • To fix an nvidia-docker driver mount, you need to either fix /var/lib/nvidia-docker/volumes/nvidia_driver/375.39/lib64 or use a docker via docker run -it --rm -v nvidia_driver_375.39:/nvidia_driver debian to gain write permissions to the drivers, and patch them.
      • Copy /usr/lib/nvidia-375/libEGL.so.375.39 into the {nvidia_driver}/lib64/ directory
      • Make sure the symlinks for {nvidia_driver}/lib64/libEGL.so.1 and {nvidia_driver}/lib64/libEGL.so eventually link to the libEGL.so.375.39 file.
  • If you have the environment variable DISPLAY set, EGL will try and use the actual Display for offscreen OpenGL rendering instead of the headless route. This is difficult (but not impossible) because now you must run the command as the same user as the graphically logged in user.
@f0k
f0k / cuda_check.py
Last active July 4, 2024 07:21
Simple python script to obtain CUDA device information
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Outputs some information on CUDA-enabled devices on your computer,
including current memory usage.
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1
from C to Python with ctypes, so it can run without compiling anything. Note
that this is a direct translation with no attempt to make the code Pythonic.
@tsuri
tsuri / preemtible_kubernetes.md
Last active February 21, 2024 09:24
kubernetes cluster w/ pre-emptible instances

Kubernetes clusters using preemtible instances

Motivation

People experimenting with kubernetes clusters on the GKE not necessarily have money to keep a full cluster on at all time. GKE clusters can be easily resized, but this still incurs in the full instance cost when the cluster is up.

Google has added preemptible instances that are ideal for many