简体   繁体   中英

google cloud notebook instance run script not in startup

I have a notebook instance with a notebook file. I use the instance's startup script to run this notebook file using papermill. I want the notebook file to be run only when I remotely start the instance, and not from google cloud console.

I'd like to know if one of these is possible, or if there's another solution:

1 - The script will detect that the instance was started from the dashboard.

2 - I will remove the startups script and use another script that can be run by a remote command.

3 - The shutdown script will remove the startup script.

Script definition is kept under /var/run/google.startup.script for the scenarios mentioned:

  1. Seems complicated detect if the instance was started from the dashboard.
  2. Is feasible to delete the startup script mentioned earlier, and run your own script remotely.
  3. Delete the script.

Before to delete the scrip I suggest you to make a backup of it in case of any issue arises for delete it, also keep in mind that AI Platform Notebooks is a managed service, any admin configuration could cause potential issues in your instance, be careful when deleting or modifying the startup script.

My advise will be actually run a notebook via a Scheduler system, I posted here the multiple options: GCP run a prediction of a model every day

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM