DrewThomasson/VoxNovel

Support continuing in headless mode

Closed this issue ยท 4 comments

Hi,
I would like to be able to continue the process if it stops instead of starting from scratch.
There are quite a few reasons for this, e.g.

  • process stopped
  • modify extracted chapters before processing
  • modify voices (not interactively, as it might be easier to some)

etc.

I'll probably try implement it on my own.
Would you want a PR for it?

Yes I'd love a progress report on this! ๐Ÿ˜ƒ

What do you mean by modify the voices though? Like after it's done generating?

No, just it won't be (only) interactive, so one can stop at any time and modify some text files on the filesystem to change the behavior of the rest of the process.

I'm not sure how much time I would need to make it happen, so if someone wants to implement it first then go ahead and do it.

Closing this issue as its been inactivate for over 3 months

Related, I found out one can pause a running docker image

  • so you could probably launch the headless VoxNovel docker with the modifications done for this other project--->
Info about pausing and unpausing Docker image

Summary of Commands for Running and Pausing the Docker Image


Launching the Docker Image (You have to use these modified launch command instead if you want to pause or unpause it.)

Without GPU Support

docker run -it -p 7860:7860 athomasson2/ebook2audiobookxtts:latest

With GPU Support

docker run --gpus all -it -p 7860:7860 athomasson2/ebook2audiobookxtts:latest

Explanation:

  • Removed --rm Flag: By omitting the --rm flag, the container won't be automatically removed when stopped or paused. This allows you to pause and unpause the container without losing its state or output.
  • GPU Support: The --gpus all flag enables GPU acceleration if you have NVIDIA GPUs and the necessary drivers (nvidia-docker2 or Docker's native GPU support) installed.

Pausing and Unpausing the Docker Container

On Linux and macOS

  • Pause Command:

    docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest" | xargs docker pause
  • Unpause Command:

    docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest" | xargs docker unpause

On Windows (PowerShell)

  • Pause Command:

    docker pause $(docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest")
  • Unpause Command:

    docker unpause $(docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest")

Explanation:

  • These commands locate the running container based on the image name athomasson2/ebook2audiobookxtts:latest and apply the pause or unpause action.
  • For Linux and macOS:
    • Uses xargs to pass the container ID to docker pause or docker unpause.
  • For Windows PowerShell:
    • Uses $() to execute the inner command and pass its output to docker pause or docker unpause.

Additional Notes:

  • Monitoring the Terminal Output: Since we're using the -it flags (-i for interactive, -t for a pseudo-TTY), you'll continue to see the terminal output of the Docker container, which is useful for monitoring its activity.
  • Preserving Container State: Pausing the container preserves its current state and data in memory. When you unpause it, the container resumes execution exactly where it left off.
  • taken from --->

DrewThomasson/ebook2audiobook#10 (comment)