mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 13:58:14 -05:00
...
This commit is contained in:
38
Dockerfile
38
Dockerfile
@@ -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"]
|
||||
@@ -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="
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user