Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use a base image with Python 3.8
FROM python:3.8-slim

# Install necessary dependencies including Vosk and Gradio
RUN apt-get update && apt-get install -y \
build-essential \
wget \
&& pip install --no-cache-dir vosk gradio

# Copy the test_gradio.py file into the container
COPY python/example/test_gradio.py /app/test_gradio.py

# Set the working directory
WORKDIR /app

# Set the entry point to run the Gradio app
ENTRYPOINT ["python", "test_gradio.py"]
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,39 @@ big clusters.

For installation instructions, examples and documentation visit [Vosk
Website](https://alphacephei.com/vosk).

# Building and Running the Docker Container

To build the Docker container for the Gradio app, use the following command:

```sh
docker build -t gradio-app .
```

To run the Docker container, use the following command:

```sh
docker run -p 7860:7860 gradio-app
```

# Deploying the Container Using a Cloud Service

To deploy the Docker container using a cloud service like AWS or Heroku, follow the instructions provided by the respective service. For example, to deploy on Heroku, you can use the following steps:

1. Install the Heroku CLI and log in to your Heroku account.
2. Create a new Heroku app:
```sh
heroku create
```
3. Push the Docker image to Heroku:
```sh
heroku container:push web
```
4. Release the Docker image:
```sh
heroku container:release web
```
5. Open the app in your browser:
```sh
heroku open
```