Skip to content

Instantly share code, notes, and snippets.

View hovo1990's full-sized avatar

Hovakim Grabski hovo1990

View GitHub Profile
@willirath
willirath / dask_salloc_srun.md
Last active June 26, 2024 17:56
Dask cluster with salloc and srun

Allocate 3 nodes with 1 task of 24 cpus each:

salloc -N 3 -n 3 -c 24

Within the allocation, make sure you have dask etc (e.g. by activating a virtual or conda env).

Start a scheduler (on the first node) and three workers (one per node):

$ srun -n1 -N1 -r0 dask-scheduler --scheduler-file scheduler.json &>> scheduler.log &
@WisdomCode
WisdomCode / moonlightssh.sh
Created June 5, 2019 12:14
Moonlight Game Streaming via SSH
#!/bin/bash
#Enables Playing on a moonlight server via an ssh tunnel. This is useful on restricted networks, as only the ssh port is needed.
#Needs the complimentary script, redirectudp, running on the ssh server to function.
#needs a private key for the ssh server
#sudo apt install ssh socat snap
#snap install moonlight
@bernardomig
bernardomig / README.md
Last active October 29, 2023 15:32
Setup podman and nvidia-container-runtime

How to setup nvidia-container-runtime and podman/runc

Podman is such a cool project! However, there is no easy way to setup the nvidia-container-runtime and podman so that we can run unprivileged container in a gpu host. This is specially interesting in environments with multiple people accessing the same host (strong isolation between containers!!!).

Steps to setup the whole system

  1. Install podman and friends (buildah and skopeo)

Ubuntu: add-apt-repository -y ppa:projectatomic/ppa && apt install podman buildah skopeo

@artificialsoph
artificialsoph / jupyter_ngrok.md
Last active May 30, 2024 04:24
Quickest way to get Jupyter notebook running on a remote server.

Log into your server with ssh, something like

ssh -i "my_secret.pem" ubuntu@12.123.12.123

If it's a new server, you'll need to install a few things.

Install conda with

@mohamadaliakbari
mohamadaliakbari / ubuntu-run-dhclient-on-startup.md
Last active July 31, 2024 08:46
Run dhclient on Startup in Ubuntu 18.04

dhclient is the Dynamic Host Configuration Protocol (DHCP) Client one would use to allow a client to connect to a DHCP server.

$ sudo nano /etc/rc.local

#!/bin/bash
dhclient
exit 0
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
@mugifly
mugifly / docker-clean.sh
Created August 18, 2016 07:17
Cleanup Script for Docker Images and Containers
#!/bin/sh
echo -e "-- Removing exited containers --\n"
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes
echo -e "\n\n-- Removing untagged images --\n"
docker rmi --force $(docker images | awk '/^<none>/ { print $3 }')
echo -e "\n\n-- Removing volume directories --\n"
docker volume rm $(docker volume ls --quiet --filter="dangling=true")
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active June 29, 2024 09:06
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@sjbertolani
sjbertolani / gist:a98553b57c19737dec28
Last active January 20, 2020 07:02
Fixing Pyrosetta Binaries to work with Anaconda Python on MacOSX

Fixing Pyrosetta Binaries to work with Anaconda Python on MacOSX

Assuming your Anaconda Python is at the front of your path (type 'which ipython' to verify that it is using the Anaconda version). Here, Anaconda is installed in ~/anaconda

System Commands are preceded with ">"

Python Commands are preceded with ">>"

If you download the Pyrosetta Binaries, unzip them, source the SetPyrosettaEnvironment.sh and run ipython while using Ananconda's version of Ipython, you may see the following error:

@mingfang
mingfang / convert id_rsa to pem
Last active July 20, 2024 14:14
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 600 id_rsa.pem