https://github.com/openanalytics/shinyproxy-gradio-demo
Running Gradio apps inside ShinyProxy
https://github.com/openanalytics/shinyproxy-gradio-demo
containers docker gradio julia kubernetes shinyproxy
Last synced: 14 days ago
JSON representation
Running Gradio apps inside ShinyProxy
- Host: GitHub
- URL: https://github.com/openanalytics/shinyproxy-gradio-demo
- Owner: openanalytics
- Created: 2023-08-14T12:58:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T08:39:56.000Z (about 1 year ago)
- Last Synced: 2024-12-05T09:32:28.284Z (about 1 year ago)
- Topics: containers, docker, gradio, julia, kubernetes, shinyproxy
- Language: Python
- Homepage: https://shinyproxy.io
- Size: 2.93 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Running Gradio apps inside ShinyProxy
This repository describes how to add a [Gradio](https://www.gradio.app/) app inside ShinyProxy (at least version 2.5.0) using [FastApi](https://fastapi.tiangolo.com/).
# 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](./application.yml) for the complete file):
```yaml
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
* https://www.gradio.app/guides/quickstart
* https://github.com/gradio-app/gradio/issues/344#issuecomment-1247033951
**(c) Copyright Open Analytics NV, 2023.**