A program designed to monitor and evaluate submissions from aicon.
This version is a rewrite of the original aicon Runner, now utilizing Celery for better jobs management and performance.
- Python >= 3.12
- Celery
- Duplicate the
example.envfile to create a new.envfile. - Update the values in the
.envfile according to your aicon-web configuration. - Install the requirements:
pip install -r requirements.txt
- Run watcher
python -m aicon_runner
You can also specify the number of concurrent processes using the following command:
python -m aicon_runner --concurrency 5
- Ensure that the
AICON_AUTH_TOKENis associated with an admin user in the system. - If
SLURM_VENV_DIRECTORYis set, you must first run a single job (submission) to initialize the task environment. Submitting multiple jobs simultaneously may lead to race conditions during environment setup. RUNNER_EVALUATOR_PATHmust be either a zip file or a valid Git URL pointing to a GitHub repository.
To configure and run the runner as a systemd service, follow these steps:
- First, copy the
example.servicefile to the appropriate systemd directory:
cp example.service ~/.config/systemd/user/aicon-runner.service- Open the copied
aicon-runner.servicefile and adjust the settings according to your specific requirements. - Verify your systemd service
systemd-analyze verify ~/.config/systemd/user/aicon-runner.service- After making your modifications, you need to enable and start the service using the following commands:
systemctl --user daemon-reload
systemctl --user enable aicon-runner.service
systemctl --user start aicon-runner.service- To ensure that the service is running correctly, check its status with:
systemctl --user status aicon-runner.serviceYou can view the runner logs by using the following command:
journalctl --user -u aicon-runner.serviceIf systemd is unavailable or linger isn't set, you can use cron to ensure that the runner is always alive.
-
Copy the Script First, copy
example.shto your desired directory. In this example, we'll use the home directory:cp example.sh $HOME/aicon-cron.sh -
Modify the Script Customize
aicon-cron.shas needed for your specific requirements. -
Set Up Cron Open the crontab for editing:
crontab -e
Add the following line to schedule the script to run every minute:
* * * * * sh $HOME/aicon-cron.sh >> $HOME/aicon-cron.log 2>&1
To check the log output from your script, use:
cat $HOME/aicon-cron.log