mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 13:58:14 -05:00
...
This commit is contained in:
@@ -10,7 +10,7 @@ LABEL org.opencontainers.image.title="ebook2audiobook" \
|
||||
org.opencontainers.image.source="https://github.com/DrewThomasson/ebook2audiobook"
|
||||
|
||||
ARG DEVICE_TAG=cpu
|
||||
ARG DOCKER_DEVICE_STR='{"name": "${DEVICE_TAG}", "os": "linux", "arch": "x86_64", "pyvenv": [3, 12], "tag": "${DEVICE_TAG}", "note": ""}'
|
||||
ARG DOCKER_DEVICE_STR='{"name": "cpu", "os": "linux", "arch": "x86_64", "pyvenv": [3, 12], "tag": "cpu", "note": ""}'
|
||||
ARG DOCKER_PROGRAMS_STR=curl ffmpeg nodejs espeak-ng sox tesseract-ocr
|
||||
ARG CALIBRE_INSTALLER_URL="https://download.calibre-ebook.com/linux-installer.sh"
|
||||
ARG ISO3_LANG=eng
|
||||
|
||||
@@ -730,6 +730,11 @@ YOU CAN IMPROVE IT OR ASK TO A TRAINING MODEL EXPERT.
|
||||
print(msg)
|
||||
else:
|
||||
use_gpu = True if (session['device'] == devices['CUDA']['proc'] and devices['CUDA']['found']) or (session['device'] == devices['JETSON']['proc'] and devices['JETSON']['found']) or (session['device'] == devices['ROCM']['proc'] and devices['ROCM']['found']) or (session['device'] == devices['XPU']['proc'] and devices['XPU']['found'])else False
|
||||
use_gpu = True if (
|
||||
(session['device'] == devices['CUDA']['proc'] and not devices['JETSON']['found'] and devices['CUDA']['found']) or
|
||||
(session['device'] == devices['ROCM']['proc'] and devices['ROCM']['found']) or
|
||||
(session['device'] == devices['XPU']['proc'] and devices['XPU']['found'])
|
||||
) else False
|
||||
stanza_nlp = stanza.Pipeline(session['language_iso1'], processors='tokenize,ner,mwt', use_gpu=use_gpu, download_method=DownloadMethod.REUSE_RESOURCES, dir=os.getenv('STANZA_RESOURCES_DIR'))
|
||||
if stanza_nlp:
|
||||
session['stanza_cache'] = stanza_model
|
||||
|
||||
@@ -25,12 +25,11 @@ services:
|
||||
# NVIDIA CUDA – requires NVIDIA Container Toolkit + CDI generated on host
|
||||
- nvidia.com/gpu=all
|
||||
|
||||
# Intel XPU / oneAPI / Arc iGPU
|
||||
# Intel XPU / oneAPI / Arc iGPU / ROCm
|
||||
- /dev/dri:/dev/dri
|
||||
|
||||
# AMD ROCm
|
||||
- /dev/kfd:/dev/kfd
|
||||
- /dev/dri:/dev/dri
|
||||
|
||||
group_add:
|
||||
- video
|
||||
|
||||
Reference in New Issue
Block a user