voila-dashboards / voila-heroku

Voilà application deployed on Heroku
Other
66 stars 65 forks source link

deploying voila with dependencies. #5

Open joseberlines opened 4 years ago

joseberlines commented 4 years ago

When having a jupyter to be deployed with voila in heroku is it possible (in theory) to read dependencies within the heroku git repository?

To be more clear. Imagine in my notebook I have something like

import pandas

from pyutils import myownfunc
from pyutils import myownfunc2

pyutils is a folder initialised to be a module (containing init file). pyutils life at the same level as the notebook itself. When deployed in heroku the file requirements includes pandas But logically it does not include my own local stored modules

In the real good presentation by @maartenbreddels and @martinRenou in NY about dashboarding with voila they deployed a really amazing app in a couple of minutes: https://www.youtube.com/watch?v=VtchVpoSdoQ

but that app does not interact with the repository once loaded (the notebook is self content once the libraries are loaded pandas... etc).

So the two questions are: a) does voila as it is designed now allow for loading my own modules within the github repo? b) does voila allow for I/O interaction with the server (saving reading for instance JSON files)

This is crucial when deciding to fully bet on voila for app deployment as a total valid (and much easier) framework compared for instance with django.

thanks a lot

maartenbreddels commented 4 years ago

I think that will work, voila executes the notebook with the current working directory set to the directory the notebook lives in. So if that directory (say the root of the repo) contains more files, like python modules, you can import them. Does this answer your question? I would just try it out, and report back here!

(from mobile phone)

On Sun, 19 Apr 2020, 16:22 joseberlines, notifications@github.com wrote:

When having a jupyter to be deployed with voila in heroku is it possible (in theory) to read dependencies within the heroku git repository?

To be more clear. Imagine in my notebook I have something like

import pandas

from pyutils import myownfunc from pyutils import myownfunc2

pyutils is a folder initialised to be a module (containing init file). When deployed in heroku the file requirements includes pandas But logically it does not include my own local stored modules

In the real good presentation by @maartenbreddels https://github.com/maartenbreddels and @martinRenou https://github.com/martinRenou in NY about dashboarding with voila they deployed a really amazing app in a couple of minutes: https://www.youtube.com/watch?v=VtchVpoSdoQ

but that app does not interact with the repository once loaded (the notebook is self content once the libraries are loaded pandas... etc).

So the two questions are: a) does voila as it is designed now allow for loading my own modules within the github repo? b) does voila allow for I/O interaction with the server (saving reading for instance JSON files)

This is crucial when deciding to fully bet on voila for app deployment as a total valid (and much easier) framework compared for instance with django.

thanks a lot

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/voila-dashboards/voila-heroku/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPEPPPPT5G5BJQF7LRKZTRNMCKHANCNFSM4MEEY4ZQ .

joseberlines commented 4 years ago

I will report results here. The Important answer here from your side is that im principle there is no reason why that should not work. I am beginner with Heroku. So my answer will take a couple of weeks. thanks.