From cb7dfae9c9f96a9f55f6c30889b4572678d6cbcd Mon Sep 17 00:00:00 2001 From: oval Date: Mon, 8 Jun 2026 12:44:32 +0200 Subject: [PATCH] Containerfile: fix font download path and remove submodule dependency - Font installed at the correct settings.FONT_PATH location (os.path.dirname(settings.FONT_PATH)), not relative to marker package dir - Remove marker/ submodule reference; marker-pdf now installed from GitHub - Updated header comment and default ENV values for public-readiness - Add comment with alternative local-build pip command --- Containerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Containerfile b/Containerfile index 859884e..42cc1a5 100644 --- a/Containerfile +++ b/Containerfile @@ -30,12 +30,11 @@ RUN pip install --no-cache-dir --break-system-packages \ pip install --no-cache-dir --break-system-packages flask gunicorn # ---- font: download GoNotoCurrent-Regular.ttf at build time ---- -# Find the marker package dir inside the installed package -RUN MARKER_DIR=$(python3 -c "import marker; print(marker.__path__[0])") && \ - mkdir -p "$MARKER_DIR/static/fonts" && \ - curl -sL -o "$MARKER_DIR/static/fonts/GoNotoCurrent-Regular.ttf" \ +RUN FONT_DIR=$(python3 -c "from marker.settings import settings; import os; print(os.path.dirname(settings.FONT_PATH))") && \ + mkdir -p "$FONT_DIR" && \ + curl -sL -o "$FONT_DIR/GoNotoCurrent-Regular.ttf" \ "https://models.datalab.to/artifacts/GoNotoCurrent-Regular.ttf" && \ - chown marker:marker "$MARKER_DIR/static/fonts/GoNotoCurrent-Regular.ttf" + chown -R marker:marker "$FONT_DIR" # ---- final image ---- COPY app.py /app/