k4yt3x / video2x

A lossless video/GIF/image upscaler achieved with waifu2x, Anime4K, SRMD and RealSR. Started in Hack the Valley II, 2018.
https://video2x.org
GNU Affero General Public License v3.0
8.88k stars 907 forks source link

WSL2 Docker Exception: process died unexpectedly #1127

Open ares-b opened 1 week ago

ares-b commented 1 week ago

Hey,

I'm trying to run the docker image but can't get it to work, tried every version.

I'm using WSL2 with nvidia-docker2 and cuda-12.5 driver installed.

Here's my docker command: docker run --gpus all -it --rm -v $PWD:/host ghcr.io/k4yt3x/video2x:$TAG -i input.mp4 -o output.mp4 -p3 upscale -h 1080 -a waifu2x -n3

With TAG="5.0.0-beta4-cuda" I get this error :

[0 llvmpipe (LLVM 12.0.0, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  fp16-p/s/a=1/1/0  int8-p/s/a=1/1/0
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=0
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  fp16-p/s/a=1/1/0  int8-p/s/a=1/1/0
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=0
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  fp16-p/s/a=1/1/0  int8-p/s/a=1/1/0
[0 llvmpipe (LLVM 12.0.0, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=0
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
Invalid bitcast
  %367 = bitcast i32 %366 to i16
LLVM ERROR: Broken function
08:56:00.534390 | ERROR    | process died unexpectedly
Traceback (most recent call last):

  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
           |         |     -> {'__name__': '__main__', '__doc__': '\nCopyright (C) 2018-2022 K4YT3X and contributors.\n\nThis program is free software: you...
           |         -> <code object <module> at 0x7f4979232870, file "/usr/local/lib/python3.8/dist-packages/video2x/__main__.py", line 3>
           -> <function _run_code at 0x7f49791d3040>
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
         |     -> {'__name__': '__main__', '__doc__': '\nCopyright (C) 2018-2022 K4YT3X and contributors.\n\nThis program is free software: you...
         -> <code object <module> at 0x7f4979232870, file "/usr/local/lib/python3.8/dist-packages/video2x/__main__.py", line 3>

  File "/usr/local/lib/python3.8/dist-packages/video2x/__main__.py", line 30, in <module>
    main()
    -> <function main at 0x7f496a4cf4c0>

  File "/usr/local/lib/python3.8/dist-packages/video2x/video2x.py", line 529, in main
    video2x.upscale(
    |       -> <function Video2X.upscale at 0x7f496a4cf3a0>
    -> <video2x.video2x.Video2X object at 0x7f496a4d8190>

  File "/usr/local/lib/python3.8/dist-packages/video2x/video2x.py", line 338, in upscale
    self._run(
    |    -> <function Video2X._run at 0x7f496a4cf310>
    -> <video2x.video2x.Video2X object at 0x7f496a4d8190>

> File "/usr/local/lib/python3.8/dist-packages/video2x/video2x.py", line 253, in _run
    raise Exception("process died unexpectedly")

Exception: process died unexpectedly
08:56:00.544976 | INFO     | Stopping upscaler processes
Invalid bitcast
  %367 = bitcast i32 %366 to i16
LLVM ERROR: Broken function
Invalid bitcast
  %367 = bitcast i32 %366 to i16
LLVM ERROR: Broken function
08:56:00.646402 | DEBUG    | Encoding queue depleted
Input #0, rawvideo, from 'pipe:0':
  Duration: N/A, bitrate: 1118625 kb/s
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1440x1080, 1118625 kb/s, 29.97 tbr, 29.97 tbn, 29.97 tbc
input.mp4: Immediate exit requested
Exiting normally, received signal 2.
08:56:00.650849 | INFO     | Encoder thread exiting

With TAG="5.0.0-beta4-cuda-patched" and TAG="5.0.0-beta5" I get this error

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/3460ab500e2f2be4db58ba2e8fa5f62bc66ce3452a0ae6ea309700ba5f737da4/merged/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1: file exists: unknown.