Shinyproxy arm issue
I tried to run the example application on an arm platform and received Container unresponsive, trying again (11/20) errors. After a bit of research it seems that the examples expect linux/amd64.
docker run -p 3838:3838 openanalytics/shinyproxy-demo R -e 'shinyproxy::run_01_hello()'
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /usr/local/bin/R: exec format error
I think this deserves a bugfix and a better (more verbose) error handling by shinyproxy. :)
I'm still struggling to fix this.
[user=adam proxyId=a5278b8c-b4f2-4a7e-a9e7-df2b4b798e1a specId=geyser] Container unresponsive, trying again (14/20): http://da3a5b79015e:3838.
I've tried everything. I can run the basic Geyser app interactively. But Shinyproxy just cannot "shock the app" into launching.
Hi @dm807cam , thanks for opening this issue. Indeed all our examples are currently only built for amd64, we could indeed start making images for arm (if the base image provides a arm variant).
Regarding the lack of error message: this is something we definitely want to improve. On k8s we already made some improvements, such that ShinyProxy can report the error on Kubernetes. For Docker this is still work in progress.
I'll keep this issue open as a enhancement request.
Hi,
i've tried porting some R application for a colleague of mine to our Raspberry PI installation. Using the generic image from r-base i can get the application to build and run fine:
FROM r-base:4.3.3
# RUN /rocker_scripts/setup_R.sh https://packagemanager.posit.co/cran/__linux__/jammy/latest
# RUN echo "\noptions(shiny.port=3838, shiny.host='0.0.0.0')" >> /usr/local/lib/R/etc/Rprofile.site
# system libraries of general use
RUN apt-get update && apt-get install --no-install-recommends -y \
libcurl4*-openssl-dev \
# ....
&& rm -rf /var/lib/apt/lists/*
# basic shiny functionality
RUN R -q -e "options(warn=2); install.packages(c('shiny'))"
# install all the other deps....
# install R code
WORKDIR /app
COPY app.R /app
EXPOSE 3838
# create user
RUN groupadd -g 1001 shiny && useradd -c 'shiny' -u 1001 -g 1001 -m -d /home/shiny -s /sbin/nologin shiny
USER shiny
CMD ["R", "-q", "-e", "shiny::runApp('app.R')"]
Using the Dockerfile to build and create a proxy locally also works fine when using the file from https://github.com/openanalytics/shinyproxy-docker/blob/master/ShinyProxy/Dockerfile What i currenltly cannot figure out from the documentation is how shinyproxy checks if the container is responsive and connects. Checking the docker container logs, the shiny app is created and deployed, but cannot be accessed from the proxy.
Is there any additional documentation on how to test the endpoints and how shinyproxy evaluates the running containers for ARM?
@Frozenbitz I think your error might be due to not specifying a fixed port for shiny to use - corresponding line is commented out above:
# RUN echo "\noptions(shiny.port=3838, shiny.host='0.0.0.0')" >> /usr/local/lib/R/etc/Rprofile.site
Also, this line needs to be adapted, since R.home() in r-base images is in /usr/lib/R and not in /usr/local/lib/R
Alternatively you can also add that to the shiny::runApp command explicitly
Just for clarification, i have added the port settings inside the application file (app.R):
options(shiny.host = '0.0.0.0')
options(shiny.port = 3838)
shinyApp(ui=ui, server=server)
Does the proxy recognise these settings or should i change the application to use the RProfile.site?
that's fine as well, so probably some other issue then... (you can confirm the port is recognized correctly if you run the app from the docker image and check the logs for a line like Listening on http://0.0.0.0:3838)
From you comment you might intend to run shinyproxy itself in a container (but not sure here), please see corresponding documentation in https://www.shinyproxy.io/documentation/deployment/#containerized-shinyproxy
You can find arm64 images with up-to-date dependencies (incl. Java 21) at devxygmbh/shinyproxy.
Thanks for your quick feedback! I did some testing this week and found i messed up the networking configuration for the proxy:
proxy:
docker.internal-networking: true
Shinyproxy tried to check the ports on localhost instead of the proper docker network. Adding the docker networking configuration fixed it. Now everything works like a charm.
@pat-s Thanks for the images. If i get time this week, i'll try some of them! For now we got our Apps and the Proxy running on PI5 and everything working behind our Main Proxy.
Hi
We just released ShinyProxy 3.2.0, which greatly improves the error handling. See the blog or release notes
Thank you for the suggestion!
P.s. we are working on releasing official images with ARM support, I hope to share some news soon!
We now have official ARM64 images available! Related to this we will also (automatically) rebuilt our Docker images every week.
See https://support.openanalytics.eu/t/update-on-shinyproxy-docker-images/3156