Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shinyproxy arm issue #519

Open
dm807cam opened this issue Aug 18, 2024 · 5 comments
Open

Shinyproxy arm issue #519

dm807cam opened this issue Aug 18, 2024 · 5 comments

Comments

@dm807cam
Copy link

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. :)

@dm807cam dm807cam changed the title Shinyproxy arm issues Shinyproxy arm issue Aug 18, 2024
@berrones
Copy link

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.

@LEDfan
Copy link
Member

LEDfan commented Sep 17, 2024

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.

@Frozenbitz
Copy link

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?

@mnazarov
Copy link
Member

mnazarov commented Dec 2, 2024

@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

@Frozenbitz
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants