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
This commit is contained in:
oval
2026-06-08 12:44:32 +02:00
parent 33997778f6
commit cb7dfae9c9
+4 -5
View File
@@ -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/