fix(infra): install leptonica/tesseract dev libs for tesseract feature build
Co-Authored-By: Kilo <kilo@kilo.ai>
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
# Stage 1: Build Rust Backend (with cargo-chef caching)
|
# Stage 1: Build Rust Backend (with cargo-chef caching)
|
||||||
# ============================================================
|
# ============================================================
|
||||||
FROM lukemathwalker/cargo-chef:latest-rust-1.89.0 AS chef
|
FROM lukemathwalker/cargo-chef:latest-rust-1.89.0 AS chef
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
libleptonica-dev libtesseract-dev clang pkg-config \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
FROM chef AS planner
|
FROM chef AS planner
|
||||||
@@ -9,6 +12,10 @@ COPY apps/tools/backend/ .
|
|||||||
RUN cargo chef prepare --recipe-path recipe.json
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
|
|
||||||
FROM chef AS builder
|
FROM chef AS builder
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
libleptonica-dev libtesseract-dev clang pkg-config \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=planner /app/recipe.json recipe.json
|
COPY --from=planner /app/recipe.json recipe.json
|
||||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
--mount=type=cache,target=/app/target \
|
--mount=type=cache,target=/app/target \
|
||||||
@@ -44,6 +51,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
tesseract-ocr \
|
tesseract-ocr \
|
||||||
tesseract-ocr-eng \
|
tesseract-ocr-eng \
|
||||||
tesseract-ocr-ind \
|
tesseract-ocr-ind \
|
||||||
|
tesseract-ocr-osd \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
fonts-dejavu-core \
|
fonts-dejavu-core \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|||||||
Reference in New Issue
Block a user