Update README.md #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu Tests | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04.2, ubuntu-20.04.5] | |
steps: | |
#- name: Checkout code | |
# uses: actions/checkout@v2 | |
- name: Set up user | |
run: | | |
sudo adduser swarm | |
sudo usermod -aG sudo swarm | |
sudo su - swarm | |
- name: Set up repository | |
run: | | |
cd / && sudo mkdir opt/hpe && cd opt/hpe && sudo chmod 777 -R /opt/hpe | |
git clone https://github.com/KatherLab/swarm-learning-hpe.git && cd swarm-learning-hpe | |
- name: Check NVIDIA driver | |
run: | | |
if ! command -v nvidia-smi &> /dev/null; then | |
sudo apt update | |
sudo apt install -y nvidia-driver-470 | |
fi | |
nvidia-smi | |
- name: Get dataset from google drive | |
run: | | |
sh workspace/automate_scripts/sl_env_setup/get_dataset_gdown.sh > output.log | |
if ! grep -q "Dataset fetched successfully." output.log; then | |
exit 1 | |
fi | |
- name: Prerequisite setup | |
run: | | |
sh workspace/automate_scripts/automate.sh -a > output.log | |
if ! grep -q "Prerequisite setup steps completed successfully. Please proceed to the next step." output.log; then | |
exit 1 | |
fi | |
- name: Server setup | |
run: | | |
sh workspace/automate_scripts/automate.sh -b -s 172.24.40.65 -d UCHICAGO > output.log | |
if ! grep -q "Server setup steps completed successfully. Please proceed to final setup." output.log; then | |
exit 1 | |
fi | |
- name: Final setup | |
run: | | |
sh workspace/automate_scripts/automate.sh -c -w marugoto_mri -s 172.24.40.65 -d UCHICAGO -n 2 -e 100 > output.log | |
if ! grep -q "Final setup steps completed successfully. Please proceed to the next step for running Swarm Learning nodes." output.log; then | |
exit 1 | |
fi | |
- name: Launch SWARM | |
run: | | |
./workspace/automate_scripts/launch_sl/run_sn.sh -s 172.24.40.65 -d UCHICAGO > output.log | |
sleep 300 # Wait for 5 minutes | |
grep -q "Starting SWARM-API-SERVER on port: 30304" output.log | |
timeout-minutes: 6 | |
- name: Clean up | |
run: | | |
./workspace/swarm_learning_scripts/stop-swarm | |
sudo killall openvpn |