git clone https://github.com/huridocs/ml-cloud-connector.git
cd ml-cloud-connector
chmod +x setup.sh
sudo ./setup.sh
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 src/ml_cloud_connector/create_post_start_script.py
[x] Start instance if it is paused
[x] Shutdown instance when not used
[x] Add a script to stop instance
[x] Check if instance is accessible for endpoints
[x] Check if post start script works
[x] Use connector in translation service
[x] Cache ip to avoid extra time
[x] Default to localhost when no variables
[x] Get ip should start server if stopped
[x] Catch error ovh.exceptions.ResourceConflictError on start or stop
[ ] Write tests
[ ] Check OVH security to avoid extra charges [ ] Use VPN ?
sudo kill -9 $(pgrep -f automatic_shutdown)
How to Run the Setup
Save the files: Save the code blocks above into two files: install_driver.sh and setup_docker.sh.
chmod +x install_driver.sh setup_docker.sh
./install_driver.sh
Your system will reboot shortly after the drivers are installed.
./setup_docker.sh
You will need to log out and log back in one final time to use the docker command without sudo.