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)
|
||||
# ============================================================
|
||||
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
|
||||
|
||||
FROM chef AS planner
|
||||
@@ -9,6 +12,10 @@ COPY apps/tools/backend/ .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
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
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--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-eng \
|
||||
tesseract-ocr-ind \
|
||||
tesseract-ocr-osd \
|
||||
ca-certificates \
|
||||
fonts-dejavu-core \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
Reference in New Issue
Block a user