Skip to content

Instantly share code, notes, and snippets.

View EricCousineau-TRI's full-sized avatar

Eric Cousineau EricCousineau-TRI

View GitHub Profile
#!/bin/bash
set -eux
cat <<EOF
Real-time kernel patching. Per:
https://frankaemika.github.io/docs/installation_linux.html
The just scriptifies stuff.
EOF
(
set -eux
mkdir -p ~/snap/barrier/682/.local/share/barrier/SSL/Fingerprints
openssl req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout ~/snap/barrier/682/.local/share/barrier/SSL/Barrier.pem -out ~/snap/barrier/682/.local/share/barrier/SSL/Barrier.pem
openssl x509 -fingerprint -sha1 -noout -in ~/snap/barrier/682/.local/share/barrier/SSL/Barrier.pem > ~/snap/barrier/682/.local/share/barrier/SSL/Fingerprints/Local.txt
)
@EricCousineau-TRI
EricCousineau-TRI / build.sh
Last active November 19, 2022 22:41
apptainer w/ no need for sudo to build / run
Moved to https://github.com/EricCousineau-TRI/repro/blob/master/shell/apptainer_stuff/build_and_install_apptainer.sh
Permalink: https://github.com/EricCousineau-TRI/repro/blob/6f0681f7/shell/apptainer_stuff/build_and_install_apptainer.sh
@EricCousineau-TRI
EricCousineau-TRI / build_gifski.sh
Last active April 15, 2022 16:29
build gifski v1.6.4
# Only tested on Ubuntu 20.04
# Not sure if `snap` distro incl. video feature.
cd /somewhere
# rust setup, but don't mess w/ PATH automatically
curl https://sh.rustup.rs -sSf -o rustup.sh
bash ./rustup.sh --no-modify-path
# gifski
$ ray_exec_all {cluster}.yaml 'ray stop'
+ ray_exec_all {cluster}.yaml 'ray stop'
ips: ['{head_ip}', '{worker_1_ip}', '{worker_2_ip}']
[{head_ip}] + ray stop
[{worker_1_ip}] + ray stop
[{worker_2_ip}] + ray stop
[{worker_1_ip}] Send termination request to `{site_packaes}/ray/core/src/ray/raylet/raylet --raylet_socket_name=/tmp/ray/session_2022-03-04_01-57-45_338123_21232/sockets/raylet --store_socket_name=/tmp/ray/session_2022-03-04_01-57-45_338123_21232/sockets/plasma_store --object_manager_port=8076 --min_worker_port=10002 --max_worker_port=19999 --node_manager_port=0 --node_ip_address={worker_1_ip} --redis_address={head_ip} --redis_port=6379 --maximum_startup_concurrency=32 --static_resource_list=node:{worker_1_ip},1.0,accelerator_type:V100,1,CPU,32,GPU,4,memory,176972165530,object_store_memory,75845213798 "--python_worker_command=/usr/bin/python3.8 {site_packaes}/ray/workers/setup_worker.py {site_packaes}/ray/workers/default_worker.py --node-ip-address={worker_1_ip} --node-manager-port=RAY_NODE_M
[2022-03-01 00:56:43,436 I 2347 2347] io_service_pool.cc:35: IOServicePool is running with 1 io_service.
[2022-03-01 00:56:43,446 I 2347 2347] store_runner.cc:30: Allowing the Plasma store to use up to 76.9778GB of memory.
[2022-03-01 00:56:43,446 I 2347 2347] store_runner.cc:46: Starting object store with directory /dev/shm, fallback /tmp/ray, and huge page support disabled
[2022-03-01 00:56:43,451 I 2347 2370] dlmalloc.cc:146: create_and_mmap_buffer(76977799176, /dev/shm/plasmaXXXXXX)
[2022-03-01 00:56:44,453 I 2347 2347] grpc_server.cc:112: ObjectManager server started, listening on port 8076.
[2022-03-01 00:56:44,510 I 2347 2347] node_manager.cc:302: Initializing NodeManager with ID <node-id-1>
[2022-03-01 00:56:44,511 I 2347 2347] grpc_server.cc:112: NodeManager server started, listening on port 45613.
[2022-03-01 00:56:44,519 I 2347 2398] agent_manager.cc:85: Monitor agent process with pid 2397, register timeout 30000ms.
[2022-03-01 00:56:44,522 I 2347 2347] raylet.cc:103: Raylet of id, <node-id-1> sta
@EricCousineau-TRI
EricCousineau-TRI / output.txt
Created February 28, 2022 21:19
`ray start --help` using v1.9.2
Usage: ray [OPTIONS] COMMAND [ARGS]...
Try 'ray --help' for help.
Error: No such command 'help'.
ubuntu@ip-10-161-49-237:~$ ray start --help
+ /home/ubuntu/anzu/run //tools:ray start --help
Usage: ray start [OPTIONS]
Start Ray processes manually on the local machine.
#!/bin/bash
set -eux
flags=()
: "${flags[@]:-}" # bad
: "${flags[@]}" # good
flags=("thing w/ space" "other.thing")
#!/bin/bash
shopt -s expand_aliases # only necessary if using in script
alias env-isolate='env -i HOME=$HOME DISPLAY=$DISPLAY SHELL=$SHELL TERM=$TERM USER=$USER PATH=/usr/local/bin:/usr/bin:/bin _ISOLATED=1'
alias bash-isolate='env-isolate bash --norc'
# Contains configuration settings for linting Python.
[tool.isort]
# Configuration file for `isort`.
#
# Invocation:
#
# cd {project}
# isort ./my_subdir
#