-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.aliases
More file actions
71 lines (59 loc) · 1.85 KB
/
.aliases
File metadata and controls
71 lines (59 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Easier navigation: .., ..., ...., ....., ......
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
# Shortcuts
alias dev="cd /mimer/NOBACKUP/groups/clin-agent-bench/dev"
alias h="history"
# Terminal
alias la="ls -laFG"
# Git (from prezto/modules/git/alias.zsh)
alias gc='git commit --verbose'
alias gca='git commit --verbose --all'
alias gcam='git commit --all --message'
alias gcm='git commit --message'
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
alias gp='git push'
alias gs='git status'
# A100 GPU status
si () {
sinfo --Node --states=idle,mix --noheader \
-O NodeList:12,StateCompact:8,Gres:90,GresUsed:90,CPUs:21,Memory:10 |
awk 'BEGIN { printf "%-12s %-8s %-35s %-35s %21s %10s\n", \
"NODE","STATE","GRES","GRES-USED","CPUs","MEM(MiB)" }
$2!="plnd" && $3~/gpu:A100/ {
sub(/\(.*/,"",$3); sub(/\(.*/,"",$4);
printf "%-12s %-8s %-35s %-35s %21s %10s\n", \
$1,$2,$3,$4,$5,$6 }' |
column -t
}
# Helper function for GPU allocation
_allocate_gpu () {
local gpu_type=$1
local hours=${2:-3} # Default to 3 hours if no argument provided
local hours_int=${hours%.*} # Integer part
local minutes=0
# Handle decimal hours properly
if [[ $hours == *"."* ]]; then
local decimal_part="0.${hours#*.}"
minutes=$(echo "$decimal_part * 60" | bc | cut -d. -f1)
fi
salloc -A NAISS2025-22-715 -N1 --no-shell --gres=gpu:${gpu_type}:1 --time=${hours_int}:${minutes}:00
}
a100 () {
_allocate_gpu "A100" "$1"
}
a100fat () {
_allocate_gpu "A100fat" "$1"
}
p () {
srun --pty bash -l
}
a () {
apptainer shell --nv --bind ./models:/models vllm-openai_latest.sif
}
sq () {
squeue -u $USER -O jobid,state,nodelist
}