Admia
Admia

Reputation: 1144

Colab restarts after I close the browser

I use Colab pro, open a session in a browser and type commands in the terminal. I especially install new software. But when I close the browser, my colab setting are restarted and I have to reinstall all those software again. Is there any way I can keep the software that are installed through terminal?

Upvotes: 0

Views: 545

Answers (1)

Yuki Sasaki
Yuki Sasaki

Reputation: 466

As you noted, Colab automatically destroys VMs after detecting user inactivity.

Colab Pro+ has a feature called background execution, which is exactly what you asked for: VMs persist after you close your browser. Note that Colab Pro+ costs 5x more than Colab Pro (as of 2022-01-09).

Alternatively, if the process of setting up the environment does not take a long time, I would put all the installation commands in the first cell, using shell access (!apt install my-things) or bash magic (%%bash). Thus, installing the software is done with one cell execution.

Upvotes: 1

Related Questions