Files
UltraSinger/container/podman.md
T
2025-02-02 06:22:40 +01:00

2.6 KiB

Containerized UltraSinger (Podman)

  1. prerequisites
    1. Podman installed (for Windows WSL2 machine provider is recommended) -> installation instructions
    2. (optional) for GPU acceleration Nvidia Container Toolkit installed -> GPU container access
  2. clone this repository:
    git clone https://github.com/rakuri255/UltraSinger.git
    
  3. build or pull the container image
    podman build -t ultrasinger .
    # or
    podman pull ghcr.io/rakuri255/ultrasinger:<version> # replace <version> with the desired version or 'latest'
    
  4. run the container (note that the first time you run the container models will be downloaded which may take a while)
    1. PowerShell:
      # remember to replace <desired-output-folder> below
      podman run `
        --rm -it --name ultrasinger `
        --device nvidia.com/gpu=all `
        -v $env:USERPROFILE\.cache:/app/UltraSinger/src/.cache `
        -v <desired-output-folder>:/app/UltraSinger/src/output `
        ghcr.io/rakuri255/ultrasinger `
        python3 UltraSinger.py -i <refer to top-level README.md>
      
      # explanation:
      podman run `
        --rm -it --name ultrasinger ` # remove container after run, interactive mode, name the container
        --device nvidia.com/gpu=all ` # optional, enables GPU acceleration if available, requires step 1.ii
        -v $env:USERPROFILE\.cache:/app/UltraSinger/src/.cache ` # cache directory for models
        -v <desired-output-folder>:/app/UltraSinger/src/output ` # output directory
        ghcr.io/rakuri255/ultrasinger ` # latest container image, set to 'ultrasinger' to use the locally built image
        python3 UltraSinger.py -i <refer to top-level README.md> # run UltraSinger, refer to top-level README.md for all options
      
    2. Bash:
      # remember to replace <desired-output-folder> below
      podman run \
        --rm -it --name ultrasinger \
        --device nvidia.com/gpu=all \
        -v $HOME/.cache:/app/UltraSinger/src/.cache \
        -v <desired-output-folder>:/app/UltraSinger/src/output \
        ultrasinger \
        python3 UltraSinger.py -i <refer to top-level README.md>
      
    3. to use cookies for YouTube downloads, you can mount your cookies.txt file into the container:
      podman run `
        ... ` # same as above
        -v <path-to-cookies.txt>:/app/UltraSinger/src/cookies.txt `
        ultrasinger `
        python3 UltraSinger.py --cookiefile cookies.txt -i <refer to top-level README.md>