plotoptix icon indicating copy to clipboard operation
plotoptix copied to clipboard

Running on Google Colab

Open will-holley opened this issue 5 years ago • 6 comments

Hello - I am excited to try out your library on a Google Colaboratory Notebook. However, I am running into difficultly setting it up, having tried both the Linux and GCP instructions. Has this been attempted by yourself or others, and if so is it possible? Thanks!

**********************************************************************************
**********************************************************************************
Video encoding library initialization failed, encoding features are not available.
**********************************************************************************
**********************************************************************************
[ERROR] (MainThread) Initial setup failed, see errors above.
[ERROR] (MainThread) Geometry setup failed.
[ERROR] (MainThread) Camera setup failed.
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/dist-packages/plotoptix/npoptix.py", line 219, in run
    assert self._is_scene_created, "Scene is not ready, see initialization messages."
AssertionError: Scene is not ready, see initialization messages.

[ERROR] (MainThread) Raytracing output startup timed out.

will-holley avatar Sep 03 '19 21:09 will-holley

Hi Will,

Yes, I tried Colab. They have too old drivers installed, please see this issue: https://github.com/googlecolab/colabtools/issues/620

I was able to properly install all the prerequisites, so we are just waiting for the driver update. It could be a perfect environment for sharing PlotOptiX.

robertsulej avatar Sep 04 '19 07:09 robertsulej

Oh, wait a second! I just checked again:

Wed Sep 4 08:41:42 2019
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 430.40 Driver Version: 418.67 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+

That one should work, I'll try it now.

EDIT: Well... not that good. I am landing on K80, which is too old architecture in turn. Compute capability 5.0 (Maxwell) is required. Previously I had more luck and got Tesla T4 assigned...

EDIT 2: Got T4, there is a problem with configuration and the library cannot recognize the gpu. Working on it...

robertsulej avatar Sep 04 '19 08:09 robertsulej

Ok, it seems that the problem is with the OptiX library. I am discussing this issue here. If there is a workaround I'll fix it with the next release. If not, we'll have to wait again for the driver update in Google Colab and I'll also switch to updated OptiX libraries.

robertsulej avatar Sep 04 '19 15:09 robertsulej

Hi Robert - Thanks for the expedient and extensive follow up!

will-holley avatar Sep 04 '19 15:09 will-holley

Btw, Colab just updated to 11.2, and I made an end-to-end example:

https://github.com/googlecolab/colabtools/issues/620#issuecomment-792170689

A lot of the set vs update stuff ends up being fairly annoying in the colab setting (an "update or set" would be nice, or just have things like set_data work even if a previous value exists).

Thanks for plotoptix!

boulos avatar Mar 07 '21 02:03 boulos

Yup, set/update defenitively to be changed. I'll improve on that as soon as I finish current project.

robertsulej avatar Mar 07 '21 10:03 robertsulej

I came back to check if/how Colab is working. They still don't have the recent drivers, but with a compatible plotoptix release everything seems ok. Here is the working notebook. I'll check from time to time and maintain it up to date.

robertsulej avatar Jul 27 '23 11:07 robertsulej