mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-10 06:18:02 -05:00
...
This commit is contained in:
@@ -522,13 +522,13 @@ powershell -nologo -noprofile -command "if (docker compose version > $null 2>&1)
|
||||
set "cmd_options="
|
||||
set "cmd_extra="
|
||||
set "py_vers=%PYTHON_VERSION% "
|
||||
if /i "%TAG:~0,6%"=="jetson" (
|
||||
set "cmd_options=--runtime nvidia"
|
||||
if /i "%TAG:~0,2%"=="cu" (
|
||||
set "cmd_options=--gpus all"
|
||||
) else if /i "%TAG:~0,6%"=="jetson" (
|
||||
set "cmd_options=--runtime nvidia --gpus all"
|
||||
set "py_vers=3.10 "
|
||||
) else if /i "%TAG:~0,8%"=="rocm" (
|
||||
set "cmd_options=--device=/dev/kfd --device=/dev/dri"
|
||||
) else if /i "%TAG:~0,2%"=="cu" (
|
||||
set "cmd_options=--gpus all"
|
||||
) else if /i "%TAG%"=="xpu" (
|
||||
set "cmd_options=--device=/dev/dri"
|
||||
) else if /i "%TAG%"=="mps" (
|
||||
@@ -541,6 +541,7 @@ set "DOCKER_IMG_NAME=%DOCKER_IMG_NAME%:%TAG%"
|
||||
if %HAS_COMPOSE%==0 (
|
||||
BUILD_NAME="%DOCKER_IMG_NAME%" docker compose --progress=plain build --no-cache ^
|
||||
--build-arg PYTHON_VERSION="%py_vers%" ^
|
||||
--build-arg DEVICE_TAG="%TAG%" ^
|
||||
--build-arg DOCKER_DEVICE_STR="%ARG%" ^
|
||||
--build-arg DOCKER_PROGRAMS_STR="%DOCKER_PROGRAMS%" ^
|
||||
--build-arg CALIBRE_INSTALLER_URL="%DOCKER_CALIBRE_INSTALLER_URL%" ^
|
||||
@@ -549,6 +550,7 @@ if %HAS_COMPOSE%==0 (
|
||||
) else (
|
||||
docker build --no-cache --progress plain ^
|
||||
--build-arg PYTHON_VERSION="%py_vers%" ^
|
||||
--build-arg DEVICE_TAG="%TAG%" ^
|
||||
--build-arg DOCKER_DEVICE_STR="%ARG%" ^
|
||||
--build-arg DOCKER_PROGRAMS_STR="%DOCKER_PROGRAMS%" ^
|
||||
--build-arg CALIBRE_INSTALLER_URL="%DOCKER_CALIBRE_INSTALLER_URL%" ^
|
||||
|
||||
@@ -673,7 +673,7 @@ function build_docker_image {
|
||||
cpu) cmd_options="";;
|
||||
cu*) cmd_options="--gpus all" ;;
|
||||
rocm*) cmd_options="--device=/dev/kfd --device=/dev/dri" ;;
|
||||
jetson*) cmd_options="--runtime nvidia"; py_vers="3.10" ;;
|
||||
jetson*) cmd_options="--runtime nvidia --gpus all"; py_vers="3.10" ;;
|
||||
xpu) cmd_options="--device=/dev/dri" ;;
|
||||
mps) cmd_options="" ;;
|
||||
*) cmd_options="" ;;
|
||||
@@ -686,6 +686,7 @@ function build_docker_image {
|
||||
build \
|
||||
--no-cache \
|
||||
--build-arg PYTHON_VERSION="$py_vers" \
|
||||
--build-arg DEVICE_TAG="$TAG" \
|
||||
--build-arg DOCKER_DEVICE_STR="$ARG" \
|
||||
--build-arg DOCKER_PROGRAMS_STR="${DOCKER_PROGRAMS[*]}" \
|
||||
--build-arg CALIBRE_INSTALLER_URL="$CALIBRE_INSTALLER_URL" \
|
||||
@@ -696,6 +697,7 @@ function build_docker_image {
|
||||
--no-cache \
|
||||
--progress plain \
|
||||
--build-arg PYTHON_VERSION="$py_vers" \
|
||||
--build-arg DEVICE_TAG="$TAG" \
|
||||
--build-arg DOCKER_DEVICE_STR="$ARG" \
|
||||
--build-arg DOCKER_PROGRAMS_STR="${DOCKER_PROGRAMS[*]}" \
|
||||
--build-arg CALIBRE_INSTALLER_URL="$CALIBRE_INSTALLER_URL" \
|
||||
|
||||
Reference in New Issue
Block a user