Prepare for public git: .gitignore, .env, sanitized configs

- Add .gitignore excluding .env, __pycache__, test_files (copyrighted PDFs),
  session logs, marker/ submodule, and other generated/private files
- Add .env with local config (gitignored); expand .env.example with all
  supported environment variables
- docker-compose.yml: all hardcoded values now use default pattern
- Containerfile: install marker-pdf from GitHub instead of local submodule;
  fix AMD_COMPUTE default to false; sanitize default OLLAMA_HOST
- Remove marker/ submodule from git tracking (keep local checkout via .gitignore)
- Remove session transcript and copyrighted ENISA PDFs from git tracking
- Sanitize local IPs in README, kubernetes deployment, deploy-podman.sh
- Fix hardcoded paths in convert_both.py and compare_conversions.py
- Update requirements.txt to reference GitHub instead of local --editable
This commit is contained in:
oval
2026-06-08 12:29:43 +02:00
parent 3601d48f5a
commit 33997778f6
18 changed files with 126 additions and 8573 deletions
+16 -16
View File
@@ -1,8 +1,7 @@
# ===== containerfile (podman & docker) for marker-api on this host =====
# ===== Containerfile for marker-api =====
#
# Targets AMD Radeon 8060S (GFX1151) with ROCm 7.2 native PyTorch 2.9.1.
# Ollama for OCR is on localhost:11435.
# Removed gfx906 base (Vega20) — now uses rocm/pytorch which natively supports gfx1151.
# Uses ROCm PyTorch base for broad GPU support (AMD + NVIDIA via CUDA).
# Ollama defaults to localhost:11434; override with env vars at runtime.
FROM rocm/pytorch:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.9.1
@@ -23,20 +22,20 @@ RUN groupadd -r marker && (groupadd -r render || true) && (groupadd -r video ||
WORKDIR /app
# ---- deps ----
COPY marker/ /app/marker/
# rocm/pytorch base already includes ROCm torch 2.9.1.
# Use --extra-index-url so pip prefers ROCm builds if torch gets reinstalled.
# Install marker-pdf from GitHub. For local builds with a cloned marker/
# directory, replace the line below with: -e /app/marker[full]
RUN pip install --no-cache-dir --break-system-packages \
--extra-index-url https://download.pytorch.org/whl/rocm7.2 \
-e "/app/marker[full]" && \
"marker-pdf[full] @ git+https://github.com/VikParuchuri/marker.git" && \
pip install --no-cache-dir --break-system-packages flask gunicorn
# ---- font: download GoNotoCurrent-Regular.ttf at build time ----
RUN mkdir -p /app/marker/static/fonts && \
curl -sL -o /app/marker/static/fonts/GoNotoCurrent-Regular.ttf \
# 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" \
"https://models.datalab.to/artifacts/GoNotoCurrent-Regular.ttf" && \
chown marker:marker /app/marker/static/fonts/GoNotoCurrent-Regular.ttf
chown marker:marker "$MARKER_DIR/static/fonts/GoNotoCurrent-Regular.ttf"
# ---- final image ----
COPY app.py /app/
@@ -54,16 +53,17 @@ ENV MARKER_OUTPUT_DIR=/app/conversion_results
ENV UPLOAD_DIR=/app/uploads
ENV RESULTS_DIR=/app/conversion_results
ENV SELF_URL=http://localhost:8001
ENV OLLAMA_HOST=http://localhost:11435
ENV OLLAMA_HOST=http://localhost:11434
ENV DEESEEK_OCR_MODEL=deepseek-ocr
ENV AMD_COMPUTE=true
ENV AMD_COMPUTE=false
ENV TORCH_DEVICE=
ENV MODEL_DTYPE=float32
ENV PORT=8001
ENV HOST=0.0.0.0
ENV LLM_SERVICE=marker.services.openai.OpenAIService
ENV LLM_SERVICE=marker.services.ollama.OllamaService
ENV USE_LLM=false
ENV OPENAI_BASE_URL=http://localhost:11435/v1
ENV OPENAI_BASE_URL=
ENV OPENAI_API_KEY=
ENV OPENAI_MODEL=
ENV OCR_BACKEND=marker
ENV DEEPSEEK_OLLAMA_HOST=http://localhost:11434