Skip to content

Instantly share code, notes, and snippets.

@link89
link89 / activate-mps.sh
Created December 23, 2025 08:39
Nvidia MPS activate script for slurm
#!/bin/bash
env | grep CUDA_
export CUDA_MPS_PIPE_DIRECTORY=$HOME/.nv_mps/$SLURM_JOB_ID/pipe
export CUDA_MPS_LOG_DIRECTORY=$HOME/.nv_mps/$SLURM_JOB_ID/log
mkdir -p $CUDA_MPS_PIPE_DIRECTORY $CUDA_MPS_LOG_DIRECTORY
cleanup_mps() {
echo "shutdown MPS server ..."
@link89
link89 / mace-training.md
Last active December 26, 2025 02:03
mace model training tips

Bug fix

Prepare Data

mace_prepare_data doesn't support loading multiple file by glob, which make it almost impossible to use it to prepare data. This PR can fix the problem: ACEsuit/mace#1313

After applying the PR, one can use the following command to prepare data

mkdir -p dataset
@link89
link89 / pm2-log-rotate.sh
Created March 26, 2026 02:54
log rotate setup for pm2
pm2 install pm2-logrotate
pm2 set pm2-logrotate:max_size 10M
pm2 set pm2-logrotate:retain 10
pm2 set pm2-logrotate:compress true
pm2 set pm2-logrotate:rotateInterval '0 0 * * *'