-
Notifications
You must be signed in to change notification settings - Fork 4
/
_start_prover-node-service.sh
33 lines (27 loc) · 1.43 KB
/
_start_prover-node-service.sh
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
nvidia-smi && \
# Check available memory
mem_available=$(grep MemAvailable /proc/meminfo | awk '{print $2}')
mem_available_gb=$((mem_available / 1024 / 1024))
echo "----------Available memory: $mem_available_gb GB---------------------------"
# Set your required memory threshold here (in GB)
required_memory=58
if [ "$mem_available_gb" -lt "$required_memory" ]; then
echo "Error: Available memory ($mem_available_gb GB) is less than the required $required_memory GB."
exit 1
fi
# Huge Pages
echo 'Checking Huge Pages configuration:'
cat /proc/meminfo | grep Huge
ls -lh /dev/hugepages
# Check HugePages_Free
hugepages_free=$(cat /proc/meminfo | grep -i hugepages_free | awk '{print $2}')
echo "HugePages_Free: $hugepages_free"
if [ $hugepages_free -lt 15000 ]; then
echo "Error: HugePages_Free ($hugepages_free) is less than 15000. Please make sure HugePages is configured correctly on the host machine. Requires 15000 HugePages configured per node."
exit 1
fi
# Download param files from local FTP server
wget -r -nH -nv --cut-dirs=1 --no-parent --user=ftpuser --password=ftppassword ftp://localhost/params/ -P /home/zkwasm/prover-node-release/workspace/static/ && \
time=$(date +%Y-%m-%d-%H-%M-%S) && \
CUDA_VISIBLE_DEVICES=0 RUST_LOG=info RUST_BACKTRACE=1 ./target/release/zkwasm-playground --config prover_config.json -w workspace --dryrunconfig dry_run_config.json -p \
2>&1 | rotatelogs -e -n 10 logs/prover/prover_${time}.log 100M