Skip to content

Instantly share code, notes, and snippets.

View twobombs's full-sized avatar
🌊
time draws the fractal of causality

Aryan Blaauw twobombs

🌊
time draws the fractal of causality
View GitHub Profile
@twobombs
twobombs / install-openmpi
Created November 23, 2024 10:08 — forked from hokiegeek2/install-openmpi
Install openmpi on Ubuntu 22.04
sudo apt-get update && sudo apt-get install infiniband-diags ibverbs-utils \
libibverbs-dev libfabric1 libfabric-dev libpsm2-dev -y
sudo apt-get install openmpi-bin openmpi-common libopenmpi-dev libgtk2.0-dev
sudo apt-get install librdmacm-dev libpsm2-dev
@twobombs
twobombs / linux-oom-killer-fixes.md
Created October 30, 2022 14:11 — forked from t27/linux-oom-killer-fixes.md
Dealing with the Linux OOM Killer

Dealing with the Linux OOM Killer at the program level

Do this in cases when you dont want to change the os-level settings, but only want to disable the OOM killer for a single process. This is useful when youre on a shared machine/server.

The OOM killer uses the process level metric called oom_score_adj to decide if/when to kill a process. This file is present in /proc/$pid/oom_score_adj. The oom_score_adj can vary from -1000 to 1000, by default it is 0.

You can add a large negative score to this file to reduce the probability of your process getting picked and terminated by OOM killer. When you set it to -1000, it can use 100% memory and still avoid getting terminated by OOM killer.

!dream "a dendritic monster emerging from the ocean, sea waves, vray, 55mm" -n 5
!dream "a wormy dendritic monster emerging from the ocean, sea waves, vray, 55mm" -n 5
!dream "furry friendly monster, photorealistic, colored, unreal engine, vray, 55mm" -n 9
@twobombs
twobombs / highqrackruntime.gist
Last active August 18, 2022 19:02
high qrack runtime scripts
# First of all a big thank you for Dan Strano and all the maintainers of the Qrack repository at the Unitary Fund
# Without their constant effort, focus and guidance all of ThereminQ and its endeavours would simply not exist.
# Please pay their sites a visit https://github.com/unitaryfund/qrack https://unitary.fund/ and join us on discord
# after the install of Qrack ( https://gist.github.com/twobombs/c93f9bbf2afe98d795372d024d6b30d7 )
# and reading the best practices Guide ( https://gist.github.com/twobombs/eee53194f7c3e00332b555bad0ae2ade )
# it is time to run the scripts that are avaliable for it on ThereminQ
# fetch the thereminq repo to get the scripts
git clone https://github.com/twobombs/thereminq.git
@twobombs
twobombs / highqrackguide.gist
Last active August 17, 2022 19:43
Guide for running Qrack at high width and depth
# First of all a big thank your for Dan Strano and all the maintainers of the Qrack repository at the Unitary Fund
# Without their constant effort, focus and guidance all of ThereminQ and its endeavours would simply not exist.
# Please pay their sites a visit https://github.com/unitaryfund/qrack https://unitary.fund/ and join them on discord
After the installation of the Qrack system this Gist is about the recommended practices of running Qrack
This part has no required runnable code, but I would like to help you here how to help Qrack tell the system you have running
Qrack is instructed by export variables and command line variables. The right mix will help Qrack perform best.
An example of a script is here ( taken from https://github.com/twobombs/thereminq/blob/master/runscripts/run-tcc-dense-cube-multi )
@twobombs
twobombs / highqrackinstall.gist
Last active August 20, 2022 09:57
Install Qrack for high width and depth on sycamore, qft and tnn_xx
# First of all a big thank your for Dan Strano and all the maintainers of the Qrack repository at the Unitary Fund
# Without their constant effort, focus and guidance all of ThereminQ and its endeavours would simply not exist.
# Please pay their sites a visit https://github.com/unitaryfund/qrack https://unitary.fund/ and join them on discord
# Download Ubuntu 22.04 server https://ubuntu.com/download/server
# Put iso file on prepared USB stick https://www.ventoy.net/en/download.html
# Boot and install Ubuntu 22.04 server on target machine ( RAID setup optional )
# Required software install
apt-get -y install -y wget curl cmake build-essential git software-properties-common ocl-icd-opencl-dev pkg-config libglvnd-dev clinfo oclgrind python-setuptools python3-setuptools dkms build-essential cmake openssh-server vim-common time opencl-headers libfreetype6-dev autotools-dev libicu-dev libbz2-dev libboost-all-dev
@twobombs
twobombs / Install vQbit Rancher 2.x HELM stack on Ubuntu
Last active April 9, 2022 08:50
Install TereminQ - Rancher 2.x HELM ThereminQ stacks on Ubuntu
Minimum requirements:
- ES/Kibana + vQbit node in k3s: 4 cores and 4 GB RAM, 40 GB storage
- ES/Kibana + vQbit node + Rancher 2 on Docker: 4 cores, 8GB RAM, 60 GB Storage
Advice:
- Install Rancher 2 on a separate controller node with at least 2 cores, 2 GB RAM and 20Gb Storage
- Deploy nodes with K3s/K3d (CPU) and/or Docker (GPU instances)
- Separate ES/Kibana stack from vQbit workloads
- Set resource limits on the same node when sharing workloads or use separate nodes
docker run -d --net host --pid host --userns host --cap-add audit_control \
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \
-v /etc:/etc \
-v /usr/bin/docker-containerd:/usr/bin/docker-containerd \
-v /usr/bin/docker-runc:/usr/bin/docker-runc \
-v /usr/lib/systemd:/usr/lib/systemd \
-v /var/lib:/var/lib \
-v /var/run/docker.sock:/var/run/docker.sock \
--label docker_bench_security \
docker/docker-bench-security
@twobombs
twobombs / nginx-tls.conf
Created February 16, 2018 08:55 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables SPDY, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#