Skip to content

kokoro-tts image pegs CPU to 100%, opens a uvicorn that watches / by default #1426

@nick-pape

Description

@nick-pape

Search before asking

  • I have searched the jetson-containers issues and found no similar feature requests.

jetson-containers Component

No response

Bug

During a large transfer into an unrelated dir (/mnt/data), with this container running in docker..

nickpape@ubuntu:~$ top
top - 13:54:55 up  1:41,  1 user,  load average: 1.60, 1.58, 1.51
Tasks: 287 total,   2 running, 285 sleeping,   0 stopped,   0 zombie
%Cpu(s):  8.5 us,  8.4 sy,  0.0 ni, 81.5 id,  0.2 wa,  0.7 hi,  0.7 si,  0.0 st
MiB Mem :   7619.9 total,     84.7 free,   3750.0 used,   3785.2 buff/cache
MiB Swap:  16384.0 total,  16380.7 free,      3.2 used.   3600.9 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   2083 root      20   0   58452  46128   8380 R  91.4   0.6  91:54.01 uvicorn
   5872 root      20   0       0      0      0 S   7.0   0.0   4:25.22 nfsd
   5871 root      20   0       0      0      0 S   1.0   0.0   1:32.38 nfsd
     25 root      20   0       0      0      0 S   0.3   0.0   0:00.55 ksoftirqd/2

Checking what it's watching:

nickpape@ubuntu:~$ sudo pwdx 2083
[sudo] password for nickpape:
2083: /

Tracing the parent:

nickpape@ubuntu:~$ pstree -ap 2083
uvicorn,2083 /opt/venv/bin/uvicorn api.src.main:app --reload --host 0.0.0.0 --port 8880
  ├─python3.12,2140 -c from multiprocessing.resource_tracker import main;main(4)
  └─python3.12,2141 -cfrom multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=5, p
      ├─{python3.12},2142
      ├─{python3.12},2143
      ├─{python3.12},2144
      ├─{python3.12},2145
      ├─{python3.12},2146
      ├─{python3.12},2224
      ├─{python3.12},2225
      ├─{python3.12},2226
      ├─{python3.12},2227
      ├─{python3.12},2228
      ├─{python3.12},2287
      ├─{python3.12},2288
      ├─{python3.12},2289
      ├─{python3.12},2290
      ├─{python3.12},2291
      ├─{python3.12},2306
      ├─{python3.12},2307
      ├─{python3.12},2308
      ├─{python3.12},2309
      ├─{python3.12},2310
      ├─{python3.12},2311
      └─{python3.12},2313
nickpape@ubuntu:~$ sudo systemctl status 2083
● docker-ab7af8914f36b63f0ac352d87066f90f3f04b4a549dbf1d386594c2043d115e6.scope - libcontainer cont>
     Loaded: loaded (/run/systemd/transient/docker-ab7af8914f36b63f0ac352d87066f90f3f04b4a549dbf1d3>
  Transient: yes
    Drop-In: /run/systemd/transient/docker-ab7af8914f36b63f0ac352d87066f90f3f04b4a549dbf1d386594c20>
             └─50-DeviceAllow.conf, 50-DevicePolicy.conf
     Active: active (running) since Sun 2025-09-28 12:10:54 CDT; 1h 46min ago
         IO: 1.0G read, 2.9M written
      Tasks: 26 (limit: 8809)
     Memory: 1.8G
        CPU: 1h 34min 17.963s
     CGroup: /system.slice/docker-ab7af8914f36b63f0ac352d87066f90f3f04b4a549dbf1d386594c2043d115e6.>
             ├─1777 bash /opt/kokoro-fastapi/start-gpu.sh
             ├─2083 /opt/venv/bin/python3.12 /opt/venv/bin/uvicorn api.src.main:app --reload --host>
             ├─2140 /opt/venv/bin/python3.12 -c "from multiprocessing.resource_tracker import main;>
             └─2141 /opt/venv/bin/python3.12 -c "from multiprocessing.spawn import spawn_main; spaw>

https://github.com/dusty-nv/jetson-containers/blob/master/packages/speech/kokoro-tts/kokoro-tts-fastapi/start-gpu.sh#L5

Seems to be watching the entire / directory, even though I don't have that in my docker compose...

 kokoro-fastapi:
    platform: linux/arm64/v8
    image: dustynv/kokoro-tts:fastapi-r36.4.0-cu128-24.04
    container_name: kokoro-fastapi
    restart: always
    runtime: nvidia
    environment:
      NVIDIA_REQUIRE_CUDA: "cuda>=12.6"
      CUDA_VERSION: "12.6.0"
      NVIDIA_VISIBLE_DEVICES: "all"
      NVIDIA_DRIVER_CAPABILITIES: "compute,utility"
    gpus: all
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    ports:
      - "8880:8880"

Anyways, I run some lightweight AI services in addition to a NAS on this machine, I really don't want kokoro pegging my CPU because it's watching root. :)

Edit: Actually, it may be watching / inside the container, unrelated to my transfer. So something is thrashing files in the container, but that path should probably be scoped? It pegs to 100% on one core as soon as the container starts.

Environment

nickpape@ubuntu:~$ docker inspect --format='{{.Config.Image}}' kokoro-fastapi
dustynv/kokoro-tts:fastapi-r36.4.0-cu128-24.04

Jetson Nano Orin Super

# R36 (release), REVISION: 4.4, GCID: 41062509, BOARD: generic, EABI: aarch64, DATE: Mon Jun 16 16:07:13 UTC 2025

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions