Open TengMCing opened 8 months ago
Hey folks @aronatkins , @jjallaire , @hadley , being able to install python packages at building time (passing a requirements.txt
or a conda environment.yml
) is indispensable in my opinion since R
lacks essential AI
, deep learning
and even image
packages like kaleido
...
An alternative would be to Dockerize the app to be able to install whatever you want:
Then you could host on your own cloud server (EC2 for example) but this is not a scalable solution.
Or to scale you could deploy on Google Cloud Run or AWS App Runner but it will not work properly because Shiny apps are stateful
applications which require sticky sessions
.
Other option would be to deploy using Kubernetes with appropriate Load Balancer configuration, which requires expert knowledge.
Therefore, the only simple viable solution today to deploy Shiny apps with reasonable scalability would be shinyapps.io
(or Posit Connect
but it is expensive and more suitable for larger enterprises). But since it does not allow python packages installation, what else can we do?
With that in mind, I believe most developers will not use Shiny
(despite being a brilliant framework) because of these limitations. And our R community will continue to lose ground.
What are your thoughts about this?
Thank you
I want to push this issue. I have spent several days and tried a plethora of workarounds trying to avoid having to install python packages at runtime. Without success. It appears that shinyapps.io does not cache venvs between session and rsconnect and shinyapps, in general, are doing their best to ignore them when they are in the uploaded files.
This must be an issue for many people since Python offers all kinds functionalities that native R does not.
Hi,
I have successfully deployed a reticulated project with the following
app.R
, but when I includetensorflow
inpy_install()
, the app will take too long to start up because of the installation and shinyapps.io will shut it down.Is there a way to pre-install all these Python dependencies at build time?
It seems like there is a solution provided at https://solutions.posit.co/write-code/reticulate/, but when I deploy the app with the RStudio button, the published app will ignore all the Python dependencies (I have downloaded and checked the
manifest.json
file of the deployed app).And if I use
rsconnect::writeManifest()
first to generatemanifest.json
andrequirements.txt
, then deploy the app with the rsconnect cli -rsconnect deploy manifest manifest.json
, the deployed app will not be able to find a Python interpreter at.venv/bin/python
.