Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker - Exited with code 127 #188

Open
ForegroundMagic opened this issue Feb 19, 2025 · 16 comments
Open

Docker - Exited with code 127 #188

ForegroundMagic opened this issue Feb 19, 2025 · 16 comments

Comments

@ForegroundMagic
Copy link

Describe the bug
Following instructions from main page:

Quick Start (docker compose)

    Install prerequisites, and start the service using Docker Compose (Full setup including UI):
        Install [Docker](https://www.docker.com/products/docker-desktop/)
        Clone the repository:

        git clone https://github.com/remsky/Kokoro-FastAPI.git
        cd Kokoro-FastAPI

        cd docker/gpu  # For GPU support
        # or cd docker/cpu  # For CPU support
        docker compose up --build

Process appears to go well until error seen in screenshot appears:

kokoro-tts-1  | /opt/nvidia/nvidia_entrypoint.sh: line 67: /app/entrypoint.sh: cannot execute: required file not found
kokoro-tts-1 exited with code 127

I looked for what could be an issue and found that next line has something to do with downloading models so i tried to download models manually - which worked but check supposedly failed (I checked with SHA256 and model seemed to be the same as other downloads I did). Now at this point I don't know if entrypoint.sh is the same one that related to nvidia (probably not?) but either way, I cannot get it to finish and run.

Screenshots or console output
Image

Image

Branch / Deployment used

Running locally, installed Docker Desktop and running commands like specified in instructions.

Operating System

Windows 10 64bit, NVIDIA GPU Gefore RTX 4060TI

Additional context
I'm new to Docker and honestly it might be something obvious that isn't obvious to a person who started using docker 2 days ago and mostly failed.

@RBEmerson970
Copy link

Same situation, same results with compose.

However, following the Docker run command, with one adjustment (see below) works reliably (ran it before finishing this post).

docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2

@ForegroundMagic
Copy link
Author

ForegroundMagic commented Feb 19, 2025

Same situation, same results with compose.

However, following the Docker run command, with one adjustment (see below) works reliably (ran it before finishing this post).

docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2

I've just tried running this command as suggested:

Image

Still not able to do anything with it. What am I missing?


 docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2
Unable to find image 'ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2' locally
v0.2.2: Pulling from remsky/kokoro-fastapi-gpu
333fa843603f: Download complete
d27544a87475: Download complete
6eabf45d2dc4: Download complete
36b7d6a9ac01: Download complete
2b73a021bed5: Download complete
4f4fb700ef54: Already exists
6921f6108f74: Download complete
40a1c66fd673: Download complete
d1da8f0791a1: Download complete
74d90daacc5b: Download complete
bf83beda4da9: Download complete
docker: failed to extract layer sha256:2a296c4de737850c4458839c7d9aed1b334a2a5f355c291ae1c4f66b9006b903: mkdir /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.overlayfs/snapshots/165/fs/app/.venv/lib/python3.10/site-packages/sympy/stats/tests: read-only file system: unknown.
See 'docker run --help'.
PS D:\AI\Audio_and_Speech\KOKORO-FASTAPI\Web> docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2
Unable to find image 'ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2' locally
docker: Error response from daemon: read-only file system: unknown.
See 'docker run --help'.

@jimmdogtopia
Copy link

Same situation, I'm attempting to go through the process again with a clean download.

@RBEmerson970
Copy link

Do any Docker containers exist, and are they usable? I appears that the download works, but as soon as you try to get into the Docker file system the wheels fall off. That leaves me wondering about the Docker installation.

@ForegroundMagic
Copy link
Author

ForegroundMagic commented Feb 19, 2025 via email

@RBEmerson970
Copy link

Docker and WSL are essentially magic here, too. I followed the magic spell on Docker.com and it worked.

With Open WebUI running, I went through the installation for Kokoro from HF, which demanded adding eSpeak. With that in place, running the Docker run example I gave above works here.

FWIW, "here" is a laptop with an i9, 64 GB RAM, Laptop RTX4090 16 GB VRAM - originally intended for X-Plane flight sims.

@fireblade2534
Copy link
Collaborator

if you are on windows its probably because GitHub tries to correct line endings and it messes with its ability to find the file for some reason.

Try running this (Make it so all repo will use Linux line endings):
git config --global core.autocrlf false
then this (or redownload the repo):
git add --renormalize .

This should be fixed in #186

@RBEmerson970
Copy link

I built a side version with the above - good news, bad news. The good news is the initial complaint/error is cleared.

The bad news is the resulting container doesn't show ports. AFAIK, the only "fix" is to duplicate the container, adding port info in the process; Docker won't allow adding ports to an existing container.

Image

@fireblade2534
Copy link
Collaborator

@RBEmerson970 Is this the command you used?
docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2

@jimmdogtopia
Copy link

if you are on windows its probably because GitHub tries to correct line endings and it messes with its ability to find the file for some reason.

Try running this (Make it so all repo will use Linux line endings): git config --global core.autocrlf false then this (or redownload the repo): git add --renormalize .

This should be fixed in #186

I just ran git config --global core.autocrlf false then redownload the repo, and reran docker compose.

It failed a few times, I had to run docker compose build 3 times, but now I have a working docker.

@RBEmerson970
Copy link

docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2
works for Docker run

It's the suggested Docker compose that won't produce port assignments. I tried doing compose just to see what happens. Ordinarily I use run.

Unfortunately, substituting nightly for v0.2.2 or latest doesn't get me the nightly build.

@fireblade2534
Copy link
Collaborator

@RBEmerson970 what was your docker file and what was your docker build command

@RBEmerson970
Copy link

git config --global core.autocrlf false

I followed Readme.md after starting at a test sub-dir cd c:\Users\Test

git clone https://github.com/remsky/Kokoro-FastAPI.git
git add --renormalize .
cd Kokoro-FastAPI
cd docker/gpu  
docker compose up --build
./start-gpu.sh

That worked, but I had to dig into Docker GUI to get the port link. No great loss - see below.

Again, for me the code below works successfully every time.

docker run --gpus all -p 127.0.0.1:8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2

@fireblade2534
Copy link
Collaborator

Do this:

git clone https://github.com/remsky/Kokoro-FastAPI.git
cd Kokoro-FastAPI
cd docker/gpu  
docker compose up --build 

Add -d to the last command if u want it to stay up even if u exit your console (though I would build it without -d confirm everything is working then add -d)

@ForegroundMagic
Copy link
Author

Used following steps and it finally launched but it doesn't work in firefox so beware.

created a new directory for kokoro
cd directory

git config --global core.autocrlf false
git clone https://github.com/remsky/Kokoro-FastAPI.git
cd Kokoro-FastAPI
git add --renormalize .
cd docker/gpu  
docker compose up --build

then accessed it with http://localhost:8880/web/

Image

Image

@RBEmerson970
Copy link

Firefox is, I regret to say, somewhat lacking in some regards. This is one of them.

OTOH, when streaming video, it very nicely recovers from interruptions other browsers fail outright on. "Horses for courses."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants