This commit is contained in:
unknown
2025-12-04 05:48:09 -08:00
parent 3f25775c3c
commit 8e7307bad7
3 changed files with 21 additions and 21 deletions

View File

@@ -16,25 +16,25 @@ COPY . /app
RUN chmod +x /app/ebook2audiobook.sh
RUN set -ex && \
BUILD_DEPS="gcc g++ make build-essential python3-dev pkg-config cargo rustc" && \
RUNTIME_DEPS="wget xz-utils bash git \
libegl1 libopengl0 \
libx11-6 libglib2.0-0 libnss3 libdbus-1-3 \
libatk1.0-0 libgdk-pixbuf-2.0-0 \
libxcb-cursor0 \
tesseract-ocr tesseract-ocr-$ISO3_LANG \
$DOCKER_PROGRAMS_STR" && \
apt-get update && \
apt-get install -y --no-install-recommends --allow-change-held-packages \
$BUILD_DEPS \
$RUNTIME_DEPS && \
wget -nv -O- "$CALIBRE_INSTALLER_URL" | sh /dev/stdin && \
echo "Building image for Ebook2Audiobook on Linux Debian Slim" && \
/app/ebook2audiobook.sh --script_mode build_docker --docker_device "$DOCKER_DEVICE_STR" && \
apt-get purge -y $BUILD_DEPS && \
apt-get autoremove -y --purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
BUILD_DEPS="gcc g++ make build-essential python3-dev pkg-config curl" && \
RUNTIME_DEPS="wget xz-utils bash git \
libegl1 libopengl0 \
libx11-6 libglib2.0-0 libnss3 libdbus-1-3 \
libatk1.0-0 libgdk-pixbuf-2.0-0 \
libxcb-cursor0 \
tesseract-ocr tesseract-ocr-$ISO3_LANG \
$DOCKER_PROGRAMS_STR" && \
apt-get update && \
apt-get install -y --no-install-recommends $BUILD_DEPS $RUNTIME_DEPS && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
. "$HOME/.cargo/env" && \
rustc --version && cargo --version && \
wget -nv -O- "$CALIBRE_INSTALLER_URL" | sh /dev/stdin && \
echo "Building image for Ebook2Audiobook on Linux Debian Slim" && \
PATH="$HOME/.cargo/bin:$PATH" /app/ebook2audiobook.sh --script_mode build_docker --docker_device "$DOCKER_DEVICE_STR" && \
apt-get purge -y gcc g++ make build-essential python3-dev pkg-config curl && \
apt-get autoremove -y --purge && apt-get clean && rm -rf /var/lib/apt/lists/*
EXPOSE 7860
ENTRYPOINT ["python3", "app.py", "--script_mode", "full_docker"]

View File

@@ -34,7 +34,7 @@ set "PYTHON_ENV=python_env"
set "PYTHONUTF8=1"
set "PYTHONIOENCODING=utf-8"
set "CURRENT_ENV="
set "HOST_PROGRAMS=python calibre-normal ffmpeg nodejs espeak-ng sox tesseract"
set "HOST_PROGRAMS=rustup python calibre-normal ffmpeg nodejs espeak-ng sox tesseract"
set "DOCKER_PROGRAMS=curl ffmpeg nodejs espeak-ng sox tesseract-ocr"
set "DOCKER_CALIBRE_INSTALLER_URL=https://download.calibre-ebook.com/linux-installer.sh"
set "DOCKER_DEVICE_STR="

View File

@@ -35,7 +35,7 @@ SCRIPT_MODE="$NATIVE"
APP_NAME="ebook2audiobook"
APP_VERSION=$(<"$SCRIPT_DIR/VERSION.txt")
OS_LANG=$(echo "${LANG:-en}" | cut -d_ -f1 | tr '[:upper:]' '[:lower:]')
HOST_PROGRAMS=("curl" "pkg-config" "calibre" "ffmpeg" "nodejs" "espeak-ng" "rust" "sox" "tesseract")
HOST_PROGRAMS=("curl" "pkg-config" "calibre" "ffmpeg" "nodejs" "espeak-ng" "cargo" "rust" "sox" "tesseract")
DOCKER_PROGRAMS=("curl" "ffmpeg" "nodejs" "espeak-ng" "sox" "tesseract-ocr")
DOCKER_DEVICE_STR=""
DOCKER_IMG_NAME="$APP_NAME"