mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
add gradio
This commit is contained in:
parent
25a5e67907
commit
c86b7a5400
@ -202,6 +202,7 @@ A collection of delicious docker recipes.
|
||||
- [x] django-cms
|
||||
- [x] dokuwiki :+1:
|
||||
- [x] gogs-arm :cn:
|
||||
- [x] gradio
|
||||
- [x] hugo
|
||||
- [x] hugo-arm
|
||||
- [x] jamapi
|
||||
|
13
gradio/Dockerfile
Normal file
13
gradio/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
#
|
||||
# Dockerfile for gradio
|
||||
#
|
||||
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
||||
|
||||
RUN pip install --no-cache-dir gradio
|
||||
|
||||
EXPOSE 7860
|
||||
|
||||
ENTRYPOINT ["python"]
|
17
gradio/README.md
Normal file
17
gradio/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
gradio
|
||||
======
|
||||
|
||||
[Gradio][1] is the fastest way to demo your machine learning model with a
|
||||
friendly web interface so that anyone can use it, anywhere!
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ docker compose up -d
|
||||
$ open http://127.0.0.1:7860
|
||||
```
|
||||
|
||||
More demos can be found [here][2].
|
||||
|
||||
[1]: https://www.gradio.app/
|
||||
[2]: https://www.gradio.app/playground
|
9
gradio/data/app.py
Normal file
9
gradio/data/app.py
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import gradio as gr
|
||||
|
||||
def greet(name):
|
||||
return "Hello " + name + "!"
|
||||
|
||||
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
||||
demo.launch()
|
10
gradio/docker-compose.yml
Normal file
10
gradio/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
gradio:
|
||||
image: vimagick/gradio
|
||||
command: app.py
|
||||
ports:
|
||||
- "7860:7860"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
working_dir: /data
|
Loading…
Reference in New Issue
Block a user