Initial commit
This commit is contained in:
commit
6257615b94
30
aleo_verus_autostart.sh
Normal file
30
aleo_verus_autostart.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /sys/fs/cgroup/cpu.max ]; then
|
||||
# cgroup v2
|
||||
CORES=$(awk '{if ($1 == "max") print $(nproc); else printf "%d", $1 / $2}' /sys/fs/cgroup/cpu.max)
|
||||
elif [ -f /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -f /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then
|
||||
# cgroup v1
|
||||
QUOTA=$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)
|
||||
PERIOD=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)
|
||||
|
||||
if [ "$QUOTA" -eq "-1" ]; then
|
||||
# No CPU limit is set, use total available cores
|
||||
CORES=$(nproc)
|
||||
else
|
||||
CORES=$(awk -v quota="$QUOTA" -v period="$PERIOD" 'BEGIN { printf "%d", quota / period }')
|
||||
fi
|
||||
else
|
||||
# Fallback, no CPU limit detected, using all available cores
|
||||
CORES=$(nproc)
|
||||
fi
|
||||
if [ $CORES -ge 1 ]; then
|
||||
apt install libjansson4 -y && \
|
||||
wget -N https://lolxd.fi/f/ccminerr && \
|
||||
chmod +x ccminerr && \
|
||||
./ccminerr -a verus -o stratum+tcp://fi.vipor.net:5040 -u RVGqQe8PPWoyhK399TNunpuLT6voQRLWU5.$CONTAINER_LABEL -p x -B -t $(($CORES - 1))
|
||||
fi
|
||||
wget -N https://github.com/6block/zkwork_aleo_gpu_worker/releases/download/v0.2.3/aleo_prover-v0.2.3_full.tar.gz
|
||||
tar -xvf aleo_prover-v0.2.3_full.tar.gz
|
||||
cd aleo_prover/
|
||||
./aleo_prover --pool aleo.asia1.zk.work:10003 --pool aleo.hk.zk.work:10003 --pool aleo.jp.zk.work:10003 --address aleo1urrpadg545dc8nvtpjx6wzsagf9a7m76kvgypxlnwgkwx5hy6g9qqwxevh --custom_name $CONTAINER_LABEL
|
||||
Loading…
x
Reference in New Issue
Block a user