WassimBenzarti/colab-ssh

Run a script from cloned repo(for setting up proper dependencies,etc)

mritunjaymusale opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
I have to manually set up my dependencies and dataset downloads each time after I connect using VSCode

Describe the solution you'd like
I have created a shell script that sets the colab Vm with all my datasets and proper depencies, I just run that script and I can start working, it would be better if the init_git_cloudflared function had an additional argument as custom_command_after_clone that way I just enter ./prepare_vm.sh in that argument and colab_ssh will do it in the background by the time I connect to the VM. I believe you have a run_command or something similar sort of function in other files is it possible to add it in init_git_cloudflared function for this purpose ?

Hello @mritunjaymusale, happy to have you here in our colab-ssh community!
Thank you for submitting this feature request. Apologies for the late response.

Just to get things clear, you want to launch a command or a script once the SSH tunnel is established. Why don't you add the command that launches your script after the colab-ssh instructions? like the following:

...
init_git_cloudflared(...)
!./your-folder/your-script-name.sh

I hope this helps! I would love to hear your thoughts!

That's quite elligant tbh. When doing it I didn't need to use !./your-folder/your-script-name.sh it was more like !./script.sh since I was already "cd"~ed into the repo folder.

So glad to hear you solved your issue. Have a great one!