I understand the GUI (such as those powered by tkinter) does not work on Google Colab, any alternatives at this point?
Error message
TclError: no display name and no $DISPLAY environment variable in google's colab
To use these notebooks you need to install binary MoebInv libraries and their dependencies.
In short, you simply need to execute it in CoLab or your Ubuntu-18.04 desktop the next cell
Related
I wish someone could help me to connect local runtime on this specific notebook on Google Colab at this link:
https://colab.research.google.com/github/ANonEntity/WhisperWithVAD/blob/main/WhisperWithVAD.ipynb
Basically it is a modified version of OpenAI's Whisper for Speech-to-Text for my videos to learn languages, with this model it take use of GPU accellation acceleration
I have been using the free version but it has been restricted due to the fact that it is not unlimited to use this model through Google's host. Since I am not really a dev, I have difficulties with the setup. It would be also if you can give me a clear instruction.
Corresponding with error in Colab: Unable to connect to runtime
You can follow these instructions to install Jupyter on your local machine and then connect the WhisperWithVAD notebook to your local runtime: https://research.google.com/colaboratory/local-runtimes.html
I was able to get this up running, but had to comment out some code in the Run Whisper block where the notebook was getting hung up:
#from google.colab import files (near the top of the block)
and
#files.download(out_path) (at the bottom of the block)
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?
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.
I know that for jupyter notebooks and jupyter lab, there are available code formatter extensions such as nb_blackor blackcellmagic. However when I installed them, it doesn't seem to work on google colab.
Do you know if there are any native option in colab or an extension that formats code (pep8 compliant)?
I don't think there's an extension directly in Colab.
What you could do, though, is to download your notebook, run
pip install -U nbqa
nbqa black notebook.ipynb
and then reupload your (now formatted) notebook to Colab
disclaimer: I'm the author of nbQA
UPDATE: as of version 21.8b0, black runs directly on notebooks, no third-party tool required
I have tried everything, none of the JupyterLab/Notebook backend hack methods seem to work as of February 2022. However, until later here is a relatively simple workaround:
[Run only once, at startup]
Connect to your drive
from google.colab import drive
drive.mount("/content/drive")
Install black for jupyter
!pip install black[jupyter]
Restart kernel
[Then]
Place your .ipynb file somewhere on your drive
Anytime you want format your code run:
!black /content/drive/MyDrive/YOUR_PATH/YOUR_NOTEBOOK.ipynb
Don't save your notebook, hit F5 to refresh the page
Voila!
Now save!
I have a USB TPU and would like to use it as LOCAL RUNTIME in Google Colab.
I was not able to find any resources on this topic.
You can use a local Runtime (local Jupyter) and it is explained here :
https://research.google.com/colaboratory/local-runtimes.html
Do I need to install all the TPU libraries in my local Jupyter and then connect to local Jupyter as local runtime to start using my USB TPU in Colab?
I'm not familiar with Google Colab, but looks like it allows you to expose your model on your hardware. You'll then need to locate your model in order to run inference with it. There are multiple ways that you can choose to run it which are all listed here:
https://coral.withgoogle.com/docs/edgetpu/inference/
I'm Attempting to run "First steps with Tensorflow" locally, outside of colab. Not really familiar with colab so I don't know how to access the "dataframes" such as "california_housing_dataframe", etc. Evidently colab "knows" how to access the dataframes in the example but I am attempting to run the exercise natively on my local system.
Thank You
I think you should have Pandas library locally installed. Then, I think it would run natively.