Skip to content

openanalytics/shinyproxy-gradio-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Running Gradio apps inside ShinyProxy

This repository describes how to add a Gradio app inside ShinyProxy (at least version 2.5.0) using FastApi.

Build the Docker image

To pull the image made in this repository from Docker Hub, use

sudo docker pull openanalytics/shinyproxy-gradio-demo

the relevant Docker Hub repository can be found at https://hub.docker.com/r/openanalytics/shinyproxy-gradio-demo

To build the image from the Dockerfile, clone this repository, then navigate to its root directory and run

sudo docker build -t openanalytics/shinyproxy-gradio-demo .

ShinyProxy Configuration

To add the gradio application to ShinyProxy add the following lines to its configuration file (see application.yml for the complete file):

proxy:
  specs:
    - id: gradio-demo
      display-name: Gradio Demo Application
      port: 8000
      container-image: openanalytics/shinyproxy-gradio-demo
      target-path: "#{proxy.getRuntimeValue('SHINYPROXY_PUBLIC_PATH')}"
      container-env:
        GRADIO_ROOT_PATH: "#{proxy.getRuntimeValue('SHINYPROXY_PUBLIC_PATH').replaceFirst('/$','')}"

References

(c) Copyright Open Analytics NV, 2023.