Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia gpu docker image #24

Open
rishikanthc opened this issue Oct 18, 2024 · 8 comments
Open

Nvidia gpu docker image #24

rishikanthc opened this issue Oct 18, 2024 · 8 comments
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest contributions hacktoberfest-accepted Hacktoberfest contributions help wanted Extra attention is needed

Comments

@rishikanthc
Copy link
Owner

Need help compiling a docker image for nvidia gpus. The project needs to be compiled on an nvidia cuda image.
I don't have the required resources to compile an image and my builds keep failing. Any help with this would be appreciated.

We simply need to use a nvidia-cuda docker image as base,
enable the nvidia flag while running make on whisper
Rest of the steps remain the same.

@rishikanthc rishikanthc added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest-accepted Hacktoberfest contributions hacktoberfest Hacktoberfest contributions labels Oct 18, 2024
@Suspect-byte
Copy link

@rishikanthc I have been digging now: My previous error was a fault with pocketbase. Here is my actual error log. Let me know if I can test something.

==========
== CUDA ==
==========

CUDA Version 12.2.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

12:26:57 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:366:7 A11y: Avoid using autofocus
364:               class="h-[30px] w-[300px] rounded-md border border-carbongray-300 p-1 focus:outline-none focus:ring-2 focus:ring-carbongray-800 focus:ring-offset-2 focus:ring-offset-white disabled:bg-carbongray-50 dark:bg-carbongray-700 disabled:dark:bg-carbongray-600"
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
365:               on:keydown={handleKeydownRecord}
366:               autofocus
                   ^
367:               disabled={renameLoading}

368:             />
12:26:57 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:374:5 A11y: <div> with dblclick handler must have an ARIA role
372:           </div>
373:         {:else}
WARNING: The NVIDIA Driver was not detected.  GPU functionality will not be available.374:           <div class="text-4xl" on:dblclick={renameTempl}>

               ^
375:             {selected?.title}
376:           </div>
12:26:57 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:396:7 A11y: Avoid using autofocus
394:               class="h-[30px] w-[300px] rounded-md border border-carbongray-300 p-1 focus:outline-none focus:ring-2 focus:ring-carbongray-800 focus:ring-offset-2 focus:ring-offset-white disabled:bg-carbongray-50 dark:bg-carbongray-700 disabled:dark:bg-carbongray-600"
395:               on:keydown={handleKeydown}
396:               autofocus
   Use the NVIDIA Container Toolkit to start this container with GPU support; see
   https://docs.nvidia.com/datacenter/cloud-native/ .
                   ^
397:               disabled={renameLoading}

Creating admin with email: myemail@myemail
PocketBase URL: http://mylocalip:8080

> [email protected] build
398:             />
> vite build
12:26:57 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:404:5 A11y: <div> with dblclick handler must have an ARIA role
402:           </div>
403:         {:else}
404:           <div class="text-4xl" on:dblclick={renameTempl}>
               ^

405:             {selectedTemplate?.title}
406:           </div>
12:26:58 PM [vite-plugin-svelte] /app/src/lib/components/UploadPane.svelte:84:1 A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.
82: <div class="w-full">
83:   <!-- Drag and Drop Area -->
84:   <div
      ^
vite v5.4.7 building SSR bundle for production...85:     class="my-4 flex h-[150px] w-full cursor-pointer items-center justify-center border border-dashed border-carbongray-200 text-carbongray-300 dark:border-carbongray-600"

86:     on:dragover={handleDragOver}
12:26:58 PM [vite-plugin-svelte] /app/src/lib/components/UploadPane.svelte:84:1 A11y: <div> with dragover, drop, click handlers must have an ARIA role
82: <div class="w-full">
83:   <!-- Drag and Drop Area -->
84:   <div
      ^
85:     class="my-4 flex h-[150px] w-full cursor-pointer items-center justify-center border border-dashed border-carbongray-200 text-carbongray-300 dark:border-carbongray-600"
86:     on:dragover={handleDragOver}
12:26:58 PM [vite-plugin-svelte] /app/src/lib/components/Processing.svelte:14:1 Unused CSS selector ".dot-container"
12: 
transforming...13: <style>
14:   .dot-container {
      ^
15:     display: inline-flex;
16:     gap: 5px;

src/routes/api/files/+server.ts (1:9): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/files/+server.ts".
src/routes/api/jobs/configure/+server.ts (1:9): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/jobs/configure/+server.ts".
src/routes/api/jobs/configure/[id]/+server.ts (1:9): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/jobs/configure/[id]/+server.ts".
src/routes/api/records/+server.ts (1:15): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/records/+server.ts".
src/routes/api/records/[id]/+server.ts (1:15): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/records/[id]/+server.ts".
src/routes/api/settings/+server.ts (1:15): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/settings/+server.ts".
src/routes/api/templates/+server.ts (1:15): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/templates/+server.ts".
src/routes/api/templates/[id]/+server.ts (1:15): "RequestHandler" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/api/templates/[id]/+server.ts".
"resolve" is imported from external module "chart.js/helpers" but never used in "src/hooks.server.ts".
"execSync" and "spawn" are imported from external module "child_process" but never used in "src/lib/wizardQueue.ts" and "src/lib/queue.ts".
✓ 2141 modules transformed.

Bull Board running at http://localhost:9243/admin/queues
Queue cleared!
Queue paused
All completed jobs have been removed
All failed jobs have been removed
All waiting jobs have been removed
All active jobs have been removed
All delayed jobs have been removed
Queue resumed
(node:40) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
vite v5.4.7 building for production...
transforming...
12:27:06 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:366:7 A11y: Avoid using autofocus
364:               class="h-[30px] w-[300px] rounded-md border border-carbongray-300 p-1 focus:outline-none focus:ring-2 focus:ring-carbongray-800 focus:ring-offset-2 focus:ring-offset-white disabled:bg-carbongray-50 dark:bg-carbongray-700 disabled:dark:bg-carbongray-600"
365:               on:keydown={handleKeydownRecord}
366:               autofocus
                   ^
367:               disabled={renameLoading}
368:             />
12:27:06 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:374:5 A11y: <div> with dblclick handler must have an ARIA role
372:           </div>
373:         {:else}
374:           <div class="text-4xl" on:dblclick={renameTempl}>
               ^
375:             {selected?.title}
376:           </div>
12:27:06 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:396:7 A11y: Avoid using autofocus
394:               class="h-[30px] w-[300px] rounded-md border border-carbongray-300 p-1 focus:outline-none focus:ring-2 focus:ring-carbongray-800 focus:ring-offset-2 focus:ring-offset-white disabled:bg-carbongray-50 dark:bg-carbongray-700 disabled:dark:bg-carbongray-600"
395:               on:keydown={handleKeydown}
396:               autofocus
                   ^
397:               disabled={renameLoading}
398:             />
12:27:06 PM [vite-plugin-svelte] /app/src/lib/components/FilePanel.svelte:404:5 A11y: <div> with dblclick handler must have an ARIA role
402:           </div>
403:         {:else}
404:           <div class="text-4xl" on:dblclick={renameTempl}>
               ^
405:             {selectedTemplate?.title}
406:           </div>
12:27:06 PM [vite-plugin-svelte] /app/src/lib/components/Processing.svelte:14:1 Unused CSS selector ".dot-container"
12: 
13: <style>
14:   .dot-container {
      ^
15:     display: inline-flex;
16:     gap: 5px;
12:27:07 PM [vite-plugin-svelte] /app/src/lib/components/UploadPane.svelte:84:1 A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.
82: <div class="w-full">
83:   <!-- Drag and Drop Area -->
84:   <div
      ^
85:     class="my-4 flex h-[150px] w-full cursor-pointer items-center justify-center border border-dashed border-carbongray-200 text-carbongray-300 dark:border-carbongray-600"
86:     on:dragover={handleDragOver}
12:27:07 PM [vite-plugin-svelte] /app/src/lib/components/UploadPane.svelte:84:1 A11y: <div> with dragover, drop, click handlers must have an ARIA role
82: <div class="w-full">
83:   <!-- Drag and Drop Area -->
84:   <div
      ^
85:     class="my-4 flex h-[150px] w-full cursor-pointer items-center justify-center border border-dashed border-carbongray-200 text-carbongray-300 dark:border-carbongray-600"
86:     on:dragover={handleDragOver}
✓ 2137 modules transformed.
rendering chunks...
computing gzip size...
.svelte-kit/output/client/_app/version.json                                  0.03 kB │ gzip:  0.05 kB
.svelte-kit/output/client/.vite/manifest.json                                3.94 kB │ gzip:  0.67 kB
.svelte-kit/output/client/_app/immutable/assets/Processing.Dm9G4P6Q.css      0.27 kB │ gzip:  0.19 kB
.svelte-kit/output/client/_app/immutable/assets/0.CRgocIj-.css              27.56 kB │ gzip:  5.30 kB
.svelte-kit/output/client/_app/immutable/entry/start.0eLO2c4v.js             0.07 kB │ gzip:  0.08 kB
.svelte-kit/output/client/_app/immutable/chunks/index.DFQgHX5K.js            0.99 kB │ gzip:  0.60 kB
.svelte-kit/output/client/_app/immutable/nodes/1.CUI4ghqd.js                 1.02 kB │ gzip:  0.60 kB
.svelte-kit/output/client/_app/immutable/nodes/0.BCxYz-0i.js                 5.46 kB │ gzip:  2.02 kB
.svelte-kit/output/client/_app/immutable/chunks/index.DAs0M3z8.js            5.71 kB │ gzip:  2.80 kB
.svelte-kit/output/client/_app/immutable/entry/app.CpaR9Kwu.js               6.41 kB │ gzip:  2.62 kB
.svelte-kit/output/client/_app/immutable/chunks/scheduler.jV20N7ly.js        7.68 kB │ gzip:  3.05 kB
.svelte-kit/output/client/_app/immutable/chunks/Icon.DT31o4xq.js            17.17 kB │ gzip:  6.78 kB
.svelte-kit/output/client/_app/immutable/chunks/entry.D1GjQcAg.js           27.06 kB │ gzip: 10.69 kB
.svelte-kit/output/client/_app/immutable/nodes/3.Cm642RFe.js                37.95 kB │ gzip:  8.80 kB
.svelte-kit/output/client/_app/immutable/chunks/StatusSpinner.DneOdMPF.js   47.27 kB │ gzip: 10.25 kB
.svelte-kit/output/client/_app/immutable/nodes/2.CmQK8mnP.js               342.01 kB │ gzip: 80.70 kB
✓ built in 16.25s
.svelte-kit/output/server/.vite/manifest.json                                        7.55 kB
.svelte-kit/output/server/_app/immutable/assets/Processing.Dm9G4P6Q.css              0.27 kB
.svelte-kit/output/server/_app/immutable/assets/_layout.CD3Tc5b8.css                27.54 kB
.svelte-kit/output/server/chunks/ssr2.js                                             0.10 kB
.svelte-kit/output/server/chunks/client.js                                           0.28 kB
.svelte-kit/output/server/internal.js                                                0.36 kB
.svelte-kit/output/server/entries/pages/_page.server.ts.js                           0.40 kB
.svelte-kit/output/server/chunks/shared-server.js                                    0.44 kB
.svelte-kit/output/server/entries/endpoints/api/jobs/configure/_server.ts.js         0.68 kB
.svelte-kit/output/server/entries/endpoints/api/stats/_server.ts.js                  0.71 kB
.svelte-kit/output/server/entries/endpoints/api/jobs/configure/_id_/_server.ts.js    0.91 kB
.svelte-kit/output/server/entries/fallbacks/error.svelte.js                          0.92 kB
.svelte-kit/output/server/entries/endpoints/api/jobs/_server.ts.js                   1.00 kB
.svelte-kit/output/server/entries/endpoints/api/summarize/_server.ts.js              1.16 kB
.svelte-kit/output/server/entries/endpoints/api/files/_server.ts.js                  1.19 kB
.svelte-kit/output/server/entries/endpoints/api/settings/_server.ts.js               1.62 kB
.svelte-kit/output/server/entries/endpoints/api/records/_id_/_server.ts.js           1.92 kB
.svelte-kit/output/server/chunks/index.js                                            2.26 kB
.svelte-kit/output/server/entries/endpoints/api/templates/_id_/_server.ts.js         2.32 kB
.svelte-kit/output/server/entries/endpoints/api/templates/_server.ts.js              2.46 kB
.svelte-kit/output/server/chunks/index2.js                                           2.68 kB
.svelte-kit/output/server/entries/endpoints/api/records/_server.ts.js                2.83 kB
.svelte-kit/output/server/chunks/hooks.server.js                                     3.44 kB
.svelte-kit/output/server/chunks/fileFuncs.js                                        4.39 kB
.svelte-kit/output/server/chunks/check.js                                            5.07 kB
.svelte-kit/output/server/chunks/wizardQueue.js                                      5.56 kB
.svelte-kit/output/server/entries/pages/_layout.svelte.js                            5.68 kB
.svelte-kit/output/server/chunks/internal.js                                         5.80 kB
.svelte-kit/output/server/chunks/exports.js                                          5.94 kB
.svelte-kit/output/server/chunks/ssr.js                                              8.40 kB
.svelte-kit/output/server/chunks/queue.js                                           11.68 kB
.svelte-kit/output/server/chunks/Icon.js                                            20.06 kB
.svelte-kit/output/server/entries/pages/wizard/_page.svelte.js                      23.04 kB
.svelte-kit/output/server/index.js                                                  90.41 kB
.svelte-kit/output/server/entries/pages/_page.svelte.js                            321.92 kB
✓ built in 25.93s

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-node
node_modules/depd/index.js (410:21): Use of eval in "node_modules/depd/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
  ✔ done
npm notice
npm notice New patch version of npm available! 10.9.0 -> 10.9.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.1
npm notice To update run: npm install -g [email protected]
npm notice
Bull Board running at http://localhost:9243/admin/queues
Listening on 0.0.0.0:3000
Queue cleared!
Queue paused
All completed jobs have been removed
All failed jobs have been removed
All waiting jobs have been removed
All active jobs have been removed
All delayed jobs have been removed
Queue resumed
hello world from wizard
Error: Command failed with exit code 2
    at ChildProcess.<anonymous> (file:///app/build/server/chunks/wizardQueue-BGMYCBeA.js:29:16)
    at ChildProcess.emit (node:events:530:35)
    at maybeClose (node:internal/child_process:1104:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:343:12)
DEVMODE ------>>>>>> false
eecuting copy
cp /models/whisper.cpp/main /usr/local/bin/whisper
COPIED WHISPER BINARY

@Suspect-byte
Copy link

Okay, im 1 step further with changing the ENV to

  • NVIDIA_DRIVER_CAPABILITIES = all
  • NVIDIA_VISIBLE_DEVICES = (to your GPU code from unraid)

Now im getting to the configure page and as soon it start the whisper creating it crashes with this log:

hello world from wizard
Error: Command failed with exit code 2
    at ChildProcess.<anonymous> (file:///app/build/server/chunks/wizardQueue-BGMYCBeA.js:29:16)
    at ChildProcess.emit (node:events:530:35)
    at maybeClose (node:internal/child_process:1104:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:343:12)
DEVMODE ------>>>>>> false
eecuting copy
cp /models/whisper.cpp/main /usr/local/bin/whisper
COPIED WHISPER BINARY

@rishikanthc
Copy link
Owner Author

Thank you so much. These are really helpful. Can you open the job queue dashboard and from the wizard queue can you get me the logs ? Would help me figure out which part of the setup wizard is failing.

@Suspect-byte
Copy link

I got the logs. Can I send you the logs through discord?

@Suspect-byte
Copy link

Suspect-byte commented Dec 9, 2024

I got two 404 errors from pocketbase:

{
  "id": "5k6j1ec6gu6p8ja",
  "created": "2024-12-09 10:25:42.383Z",
  "updated": "2024-12-09 10:25:42.383Z",
  "data": {
    "auth": "guest",
    "details": "code=404, message=Not Found",
    "error": "Not Found.",
    "execTime": 0.033694,
    "method": "GET",
    "referer": "http://serverip:8080/",
    "remoteIp": "PC OtherVLAN",
    "status": 404,
    "type": "request",
    "url": "/favicon.ico",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
    "userIp": "PC OtherVLAN"
  },
  "message": "GET /favicon.ico",
  "level": 8
}

The other one:

{
  "id": "0i26vw989q6wt5s",
  "created": "2024-12-09 10:25:42.322Z",
  "updated": "2024-12-09 10:25:42.322Z",
  "data": {
    "auth": "guest",
    "details": "code=404, message=Not Found",
    "error": "Not Found.",
    "execTime": 19.467683,
    "method": "GET",
    "referer": "",
    "remoteIp": "PC OtherVLAN",
    "status": 404,
    "type": "request",
    "url": "/",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
    "userIp": "PC OtherVLAN"
  },
  "message": "GET /",
  "level": 8
}

@Suspect-byte
Copy link

As soon as I reach the Configuration Wizard and select Medium with English language, then Scriberr crashes during the compiling of whisperr.cpp. Beyond this, I cannot look further.

@Suspect-byte
Copy link

Furthermore I looked at the logs as soon as I clicked the 'configure' this is the log I get from the Scriberr-nvidia docker container:

hello world from wizard
stdout: make: Entering directory '/models/whisper.cpp'
stdout: I ccache not found. Consider installing it for faster compilation.
stdout: I whisper.cpp build info:
I UNAME_S:   Linux
I UNAME_P:   x86_64
I UNAME_M:   x86_64
I CFLAGS:    -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -DGGML_USE_OPENMP  -std=c11   -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -march=native -mtune=native -fopenmp -Wdouble-promotion
I CXXFLAGS:  -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread -fopenmp  -march=native -mtune=native -Wno-array-bounds -Wno-format-truncation -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -DGGML_USE_OPENMP
I NVCCFLAGS: -std=c++11 -O3
I LDFLAGS:
stdout: I CC:        cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
stdout: I CXX:       c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
stdout: rm -vrf *.dot main bench quantize server tests/test-c.o
stdout: rm -rvf src/*.o
stdout: rm -rvf src/coreml/*.o
stdout: rm -rvf tests/*.o
stdout: rm -rvf examples/*.o
stdout: rm -rvf *.a
stdout: rm -rvf *.dll
stdout: rm -rvf *.so
stdout: rm -rvf *.dot
stdout: rm -rvf ggml/*.a
stdout: rm -rvf ggml/*.dll
stdout: rm -rvf ggml/*.so
stdout: rm -vrf ggml/src/*.o
stdout: rm -vrf ggml/src/ggml-metal-embed.metal
stdout: rm -vrf ggml/src/ggml-cuda/*.o
stdout: rm -vrf ggml/src/ggml-cuda/template-instances/*.o
stdout: rm -rvf main bench quantize server
stdout: rm -rvf tests/test-c.o
stdout: find examples -type f -name "*.o" -delete
stdout: make: Leaving directory '/models/whisper.cpp'
stdout: make: Entering directory '/models/whisper.cpp'
stdout: I ccache not found. Consider installing it for faster compilation.
stderr: expr: syntax error: unexpected argument '070100'
stderr: expr: syntax error: unexpected argument '080100'
stdout: I whisper.cpp build info:
I UNAME_S:   Linux
I UNAME_P:   x86_64
I UNAME_M:   x86_64
I CFLAGS:    -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -DGGML_USE_OPENMP -DGGML_USE_CUDA -I/usr/local/cuda/include -I/usr/local/cuda/targets/x86_64-linux/include  -std=c11   -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -march=native -mtune=native -fopenmp -Wdouble-promotion
I CXXFLAGS:  -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread -fopenmp  -march=native -mtune=native -Wno-array-bounds -Wno-format-truncation -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -DNDEBUG -DGGML_USE_OPENMP -DGGML_USE_CUDA -I/usr/local/cuda/include -I/usr/local/cuda/targets/x86_64-linux/include
I NVCCFLAGS: -std=c++11 -O3 -use_fast_math --forward-unknown-to-host-compiler -arch=native -DGGML_CUDA_DMMV_X=32 -DGGML_CUDA_MMV_Y=1 -DK_QUANTS_PER_ITERATION=2 -DGGML_CUDA_PEER_MAX_BATCH_SIZE=128
I LDFLAGS:   -lcuda -lcublas -lculibos -lcudart -lcublasLt -lpthread -ldl -lrt -L/usr/local/cuda/lib64 -L/usr/lib64 -L/usr/local/cuda/targets/x86_64-linux/lib -L/usr/local/cuda/lib64/stubs -L/usr/lib/wsl/lib
stdout: I CC:        cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
stdout: I CXX:       c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
stderr: /bin/sh: 1:
stderr: nvcc: not found
stdout: I NVCC:
stderr: /bin/sh: 1: nvcc: not found
stderr: Makefile:881: *** I ERROR: For CUDA versions < 11.7 a target CUDA architecture must be explicitly provided via environment variable CUDA_DOCKER_ARCH, e.g. by running "export CUDA_DOCKER_ARCH=compute_XX" on Unix-like systems, where XX is the minimum compute capability that the code needs to run on. A list with compute capabilities can be found here: https://developer.nvidia.com/cuda-gpus .  Stop.
stdout: make: Leaving directory '/models/whisper.cpp'
Error: Command failed with exit code 2
at ChildProcess.<anonymous> (file:///app/build/server/chunks/wizardQueue-BGMYCBeA.js:29:16)
at ChildProcess.emit (node:events:530:35)
at maybeClose (node:internal/child_process:1104:16)
at Socket.<anonymous> (node:internal/child_process:456:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:343:12)
DEVMODE ------>>>>>> false
eecuting copy
cp /models/whisper.cpp/main /usr/local/bin/whisper
COPIED WHISPER BINARY
stderr: cp: cannot stat '/models/whisper.cpp/main': No such file or directory
file:///app/build/server/chunks/wizardQueue-BGMYCBeA.js:52
reject(new Error(Command failed with exit code ${code !== null ? code : "unknown"}));
^
Error: Command failed with exit code 1
at ChildProcess.<anonymous> (file:///app/build/server/chunks/wizardQueue-BGMYCBeA.js:52:16)
at ChildProcess.emit (node:events:530:35)
at maybeClose (node:internal/child_process:1104:16)
at Socket.<anonymous> (node:internal/child_process:456:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:343:12)
Node.js v22.10.0

@Suspect-byte
Copy link

According to Claude.ai this should be the problem: I made a new dockerfile.gpu didnt have any time to test it or push it.. never done that in my life.. ;)

# Use CUDA development image with Ubuntu
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base

# Set environment variables to make the installation non-interactive
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ="Etc/UTC"

# Install system dependencies
RUN apt-get update && apt-get install -y \
    python3 \
    python3-dev \
    python3-pip \
    software-properties-common \
    tzdata \
    ffmpeg \
    curl \
    unzip \
    git \
    build-essential \
    cmake \
    ca-certificates \
    cuda-toolkit-12-2

# Add the required PPA for audiowaveform
RUN add-apt-repository ppa:chris-needham/ppa \
    && apt-get update \
    && apt-get install -y audiowaveform

# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
    && apt-get install -y nodejs

# Clean up the apt cache to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Set environment variables for build arguments
ARG POCKETBASE_ADMIN_EMAIL
ARG POCKETBASE_ADMIN_PASSWORD
ARG POCKETBASE_URL
ARG SCRIBO_FILES
ARG REDIS_HOST
ARG REDIS_PORT
ARG OPENAI_API_KEY
ARG OPENAI_ENDPOINT=https://api.openai.com/v1
ARG OPENAI_MODEL="gpt-4"
ARG OPENAI_ROLE="system"
ARG POCKETBASE_VERSION=0.22.21
ARG DEV_MODE
ARG NVIDIA
ARG CONCURRENCY

# Set corresponding environment variables
ENV POCKETBASE_ADMIN_EMAIL=$POCKETBASE_ADMIN_EMAIL
ENV POCKETBASE_ADMIN_PASSWORD=$POCKETBASE_ADMIN_PASSWORD
ENV SCRIBO_FILES=$SCRIBO_FILES
ENV REDIS_HOST=$REDIS_HOST
ENV REDIS_PORT=$REDIS_PORT
ENV OPENAI_API_KEY=$OPENAI_API_KEY
ENV OPENAI_ENDPOINT=$OPENAI_ENDPOINT
ENV OPENAI_MODEL=$OPENAI_MODEL
ENV OPENAI_ROLE=$OPENAI_ROLE
ENV BODY_SIZE_LIMIT=512M
ENV DEV_MODE=$DEV_MODE
ENV POCKETBASE_URL=$POCKETBASE_URL
ENV NVIDIA=$NVIDIA
ENV CONCURRENCY=$CONCURRENCY

# Set CUDA-specific environment variables
ENV CUDA_HOME=/usr/local/cuda
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

WORKDIR /app

# Copy application files
COPY . .

# Clone Whisper.cpp and prepare for compilation
RUN git clone https://github.com/ggerganov/whisper.cpp.git \
    && cd whisper.cpp \
    && make clean \
    && CUDA_DOCKER_ARCH=compute_61 make -j$(nproc) \
    && cp main /usr/local/bin/whisper

# Install Node.js dependencies
RUN npm ci

# Expose necessary ports
EXPOSE 3000 8080 9243

# Default command
CMD ["/bin/sh", "/app/start_services.sh"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest contributions hacktoberfest-accepted Hacktoberfest contributions help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants