Problems with reticulate when publishing to shinyapps.io

Hello guys,

I have the following error when deploying my app:

On the logs this is what i get

2021-04-01T05:52:53.707966+00:00 shinyapps[3895664]: Killed
2021-04-01T05:52:53.715789+00:00 shinyapps[3895664]: Error in value[3L] :
2021-04-01T05:52:53.715790+00:00 shinyapps[3895664]: Error installing package(s): 'keras', 'pandas', 'numpy', 'scipy', 'scikit-learn', 'tensorflow-cpu', 'pillow'
2021-04-01T05:52:53.715824+00:00 shinyapps[3895664]: Ejecución interrumpida
2021-04-01T05:52:53.715792+00:00 shinyapps[3895664]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
2021-04-01T05:52:53.891988+00:00 shinyapps[system]: Out of memory!

This is due to the global.R file which has the following lines:

virtualenv_create(envname = "python_environment", python= "python3")
virtualenv_install("python_environment", packages = c('keras', 'pandas','numpy','scipy','scikit-learn', 'tensorflow-cpu','pillow'))
reticulate::use_virtualenv("python_environment", required = TRUE)

Is this a free tier app, or a paid one that supports increasing the instance memory?

Free tier... is that the problem?

I think being free tier limits your ability to simply get more memory, and it seems your requirements take a lot of memory.
Have you profiled your app locally to determine how much memory it uses ? That information might be useful to you.

Okay,

But this step could be run just once when creating the image for the app. Is there any way to add an additional step to the image build?

I'm confused and don't understand what your question relates to

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.