@@ -17,9 +17,28 @@ while :; do
1717 fi
1818done
1919
20+ # Enable linger
21+ sudo loginctl enable-linger user
22+
2023# Install other dependencies
2124sudo apt install -y gcc pkg-config libssl-dev build-essential apt-transport-https ca-certificates curl software-properties-common nvtop
2225
26+ # Install docker
27+ sudo apt-get update
28+ sudo apt-get install ca-certificates curl
29+ sudo install -m 0755 -d /etc/apt/keyrings
30+ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
31+ sudo chmod a+r /etc/apt/keyrings/docker.asc
32+ echo \
33+ " deb [arch=$( dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
34+ $( . /etc/os-release && echo " $VERSION_CODENAME " ) stable" | \
35+ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
36+ sudo apt-get update
37+ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
38+ sudo groupadd docker
39+ sudo usermod -aG docker $USER
40+ newgrp docker
41+
2342# Install tailscale
2443curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null
2544curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
@@ -32,6 +51,15 @@ sudo add-apt-repository ppa:graphics-drivers/ppa
3251sudo apt update
3352sudo apt install nvidia-driver-570
3453
54+ # If see errors
55+ sudo apt-mark unhold cuda-drivers cuda-toolkit-12-6 nvidia-dkms-565-server nvidia-fabricmanager-565 nvidia-headless-565-server nvidia-utils-565-server
56+ sudo apt update
57+ sudo apt install nvidia-driver-570
58+ sudo apt autoremove
59+ sudo apt autoclean
60+ sudo reboot
61+ nvidia-smi # To check if the driver is installed correctly
62+
3563# Setup Docker and CUDA
3664curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
3765curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
@@ -59,30 +87,38 @@ foundryup
5987# Create directories
6088mkdir -p repos/proof_aggregation
6189mkdir -p config
62- # mkdir -p .config/systemd/user
90+ mkdir -p .config/systemd/user
6391mkdir -p .keystores
6492
6593# Clone Repo
6694cd repos/proof_aggregation
6795git clone https://github.com/yetanotherco/aligned_layer.git
6896cd aligned_layer
6997git checkout staging
70- cd ../..
98+ cd
7199
72100# Create keystore
73101cast wallet import proof_aggregation.keystore -k $HOME /.keystores -i
74102
75103# Copy config file
76104# cp repos/proof_aggregation/aligned_layer/config-files/config-proof-aggregator.yaml config/config-proof-aggregator.yaml
77- . $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/config_file.sh $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/config-proof-aggregator.template.yaml
105+ $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/config_file.sh $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/config-proof-aggregator.template.yaml
78106
79107# Build the proof_aggregator
80108cd repos/proof_aggregation/aligned_layer
81109cargo install --path aggregation_mode --features prove
82110
83111# Setup systemd service
84- sudo cp $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/aggregation_mode.service /etc/systemd/system/aggregation_mode.service
85- sudo systemctl enable aggregation_mode.service
112+ cp $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/aggregation_mode.service $HOME /.config/systemd/user/aggregation_mode.service
113+ cp $HOME /repos/proof_aggregation/aligned_layer/infra/aggregation_mode/aggregation_mode.timer $HOME /.config/systemd/user/aggregation_mode.timer
114+
115+ # sudo systemctl enable aggregation_mode.service
116+ systemctl --user enable aggregation_mode.timer
117+ systemctl --user start aggregation_mode.timer
118+
119+ # Run the proof_aggregator manually if you want
120+ systemctl --user start aggregation_mode.service
121+ systemctl --user start aggregation_mode_stage.service
86122
87- # Run the proof_aggregator
88- sudo systemctl start aggregation_mode.service
123+ # Check timer status
124+ systemctl --user status aggregation_mode.timer
0 commit comments