diff --git a/Dockerfile b/Dockerfile index 0c58eab..c34c556 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,11 @@ RUN \ wheel && \ pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \ nvidia-cublas-cu12 \ + nvidia-cuda-nvrtc-cu12 \ + nvidia-cuda-runtime-cu12 \ "nvidia-cudnn-cu12>=9.0,<10.0" \ + nvidia-cufft-cu12 \ + nvidia-curand-cu12 \ onnxruntime-gpu \ "wyoming-piper==${PIPER_VERSION}" && \ if [ -z ${PIPER_BIN_VERSION+x} ]; then \ diff --git a/root/etc/s6-overlay/s6-rc.d/svc-piper/run b/root/etc/s6-overlay/s6-rc.d/svc-piper/run index ff5fad8..362c32d 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-piper/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-piper/run @@ -1,6 +1,16 @@ #!/command/with-contenv bash # shellcheck shell=bash +NVIDIA_PACKAGE_DIR="/lsiopy/lib/python3.12/site-packages/nvidia" + +for dir in "${NVIDIA_PACKAGE_DIR}"/*; do + if [ -d "$dir/lib" ]; then + export LD_LIBRARY_PATH="$dir/lib:$LD_LIBRARY_PATH" + fi +done + +LD_LIBRARY_PATH="/lsiopy/lib/python3.12/site-packages/onnxruntime/capi:$LD_LIBRARY_PATH" + exec \ s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 10200" \ s6-setuidgid abc python3 -m wyoming_piper \