How to Set Up Audio WebUI with Docker: Inspired by Whisper, Gradio, and Audiocraft

I want to try AudioCraft in a desktop environment on Ubuntu 22.04, so I will use Docker to achieve this. I will proceed by cloning the GitHub below; once AudioWEBUI is set up, it appears that AudioCraft can be used. Other options include text to speech, RVC, and Whisper.

I have just installed Ubuntu on the actual (local) machine, but have already installed Docker and Docker Compose. In addition, I have installed the NVIDIA container toolkit to use GPUs with containers.

https://github.com/LajaSoft/audio-webui-docker

The content on this GitHub project is based on https://github.com/gitmylo/audio-webui and has been implemented using Docker.

git clone https://github.com/LajaSoft/audio-webui-docker.git

Go to the project and start the container.

cd audio-webui-docker
docker compose up

audio-webui-docker-app-1 | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
audio-webui-docker-app-1 |
audio-webui-docker-app-1 | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
audio-webui-docker-app-1
audio-webui-docker-app-1 | /opt/nvidia/nvidia_entrypoint.sh: line 67: /app/run.sh: Permission denied
audio-webui-docker-app-1 | /opt/nvidia/nvidia_entrypoint.sh: line 67: exec: /app/run.sh: cannot execute: Permission denied
audio-webui-docker-app-1 exited with code 126

The error message indicates that /app/run.sh does not have executable permissions. This is because the /app/run.sh file in the container does not have executable permissions.

The following steps can solve the problem

  1. On the local machine, check the permissions of the run.sh file. This must be done locally before building the container.
  2. Grant run.sh the run permission; since we are on Ubuntu, we can run the following command in the terminal
sudo chmod x run.sh

However, the same error persists even after changing the permissions.

I’ve been looking into some possible causes and workarounds for the same error despite changing the permissions with the command.

  1. Docker cache: the image may be cached from a previous build, try clearing the Docker cache and rebuild the image.
docker compose build --no-cache
docker compose up
  1. Check Dockerfile: Check if the path and copy method of run.sh is set correctly in the Dockerfile. In particular, check that the COPY command copies run.sh.
  2. User permissions: Make sure that the user executing the scripts within the container has the permission to run run.sh. If necessary, you can set user permissions in the Dockerfile.
  3. Entry point: If the script is configured to run at an entry point (ENTRYPOINT instruction), check if the setting is correct.
  4. Script Content: Verify that other files and services on which the run.sh script depends are configured correctly.
  5. Debugging: If you need more detailed information, try adding debugging code (e.g. ls -l /app or whoami ) to the beginning of the run.sh script and have it output to the container’s log.

However, since there are no other containers of importance, the following command will remove unused or unwanted Docker objects from the system. We also decide to remove the image.

docker system prune
docker rmi $(docker images -q)

Then re-run the following command

docker compose up

This time it worked. Access it with a browser.

http://loclahost:7860

I thought AudioCraft was all I needed, but it seems to have other features. My PC has 16GB of memory and an NVIDIA GTX1060 grabo. The PC is an older computer with a release date of July 2016, but it works.

Please share if you like it!
TOC