diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f0236c1a --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index 8f4d4d52..61bcb76d 100644 --- a/README.md +++ b/README.md @@ -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 + ```