Finally, we need to set up the fine-tuning to run every day and automatically upload the new model to the server. We can achieve this easily by creating a crontab in the training server.
First, we need to run the crontab command:
crontab -e
Then, we can just add the following line to define the time that we want finetune.py to run:
0 3 * * * python /home/ubuntu/project/scripts/finetune.py
As we defined, the Python command will run at 3 a.m. every day.