While the Docker container works fine locally (and when run on the server directly as well), I just get a “Container did not respond in time” on ShinyProxy.
The Dockerfile, I use to create the image is
FROM <CUSTOM-BASE-IMAGE>
USER docker
WORKDIR /home/docker
COPY requirements.txt /home/docker
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt
RUN pip3 install gunicorn
COPY . /home/docker
EXPOSE 8080
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8080", "-k", "uvicorn.workers.UvicornWorker"]
and the app configuration for ShinyProxy looks like:
We tested Shiny For Python in ShinyProxy and this is working for us. You can see the demo code here: https://github.com/openanalytics/shinyproxy-shiny-for-python-demo .
I think that the main difference with your setup is that we didn’t add the SCRIPT_NAME and target-path settings.
Can you let us know whether your app works with the above demo code?
Thanks for the example, that works fine from e. But unfortunately I get a “Unsupported upgrade request.” from the airmass app still. Other apps working though, so not sure what actually causes that particular issue.
Thanks again for helping!
That’s weird, this app is working fine for me.
I’m using this Dockerfile:
FROM python:3.10
WORKDIR /app
EXPOSE 8080
COPY . .
RUN pip3 install gunicorn
RUN pip3 install -r requirements.in
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8080", "-k", "uvicorn.workers.UvicornWorker"]
Note that I had to install the dependencies from the requirements.in file, since it seems a wrong Shiny version is pinned in the requirements.txt file (and python would give an error at startup).
I pushed this image to Docker hub using ledfan/airmass, can you test the following config:
Finally, I see that this example is downloading a file from the internet, maybe this fails? Can you check the logs of the container when it fails, e.g. using docker ps -a, docker logs -f <id>