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:
+37
-12
@@ -7,22 +7,47 @@
|
||||
# podman --env, or docker-compose environment.
|
||||
|
||||
# -----------------------------------
|
||||
# Ollama (OCR fallback)
|
||||
# Authentication
|
||||
# -----------------------------------
|
||||
OLLAMA_HOST=http://10.0.1.127:11434
|
||||
DEESEEK_OCR_MODEL=deepseek-ocr
|
||||
API_KEY= # API key for X-API-Key auth (empty = disabled)
|
||||
SELF_URL=http://localhost:8001 # Public URL for file download/upload links
|
||||
|
||||
# -----------------------------------
|
||||
# AMD GPU (set TRUE on AMD/ROCm systems)
|
||||
# OCR Backend
|
||||
# -----------------------------------
|
||||
AMD_COMPUTE=false # set to "true" to enable ROCm
|
||||
TORCH_DEVICE= # override PyTorch device ("rocm", "cuda", "cpu")
|
||||
MODEL_DTYPE=float32 # "float32" or "bfloat16" (bfloat16 on capable GPUs)
|
||||
OCR_BACKEND=marker # "marker" (marker-pdf) or "deepseek" (deepseek-ocr via ollama)
|
||||
|
||||
# -----------------------------------
|
||||
# DeepSeek OCR (via Ollama)
|
||||
# -----------------------------------
|
||||
DEEPSEEK_OLLAMA_HOST=http://localhost:11434
|
||||
DEEPSEEK_OCR_MODEL=deepseek-ocr:latest
|
||||
DEEPSEEK_OCR_PROMPT=<|grounding|>Free OCR.
|
||||
|
||||
# -----------------------------------
|
||||
# Ollama (LLM correction)
|
||||
# -----------------------------------
|
||||
OLLAMA_HOST=http://localhost:11434
|
||||
DEESEEK_OCR_MODEL=deepseek-ocr
|
||||
|
||||
USE_LLM=false # Use an LLM to improve conversion accuracy
|
||||
LLM_SERVICE=marker.services.ollama.OllamaService
|
||||
|
||||
OPENAI_BASE_URL= # For OpenAI-compatible LLM API
|
||||
OPENAI_API_KEY= # API key for OpenAI-compatible service
|
||||
OPENAI_MODEL= # Model name for OpenAI-compatible service
|
||||
|
||||
# -----------------------------------
|
||||
# AMD GPU (set to true on AMD/ROCm systems)
|
||||
# -----------------------------------
|
||||
AMD_COMPUTE=false # set to "true" to enable ROCm
|
||||
TORCH_DEVICE= # override PyTorch device ("rocm", "cuda", "cpu")
|
||||
MODEL_DTYPE=float32 # "float32" or "bfloat16" (bfloat16 on capable GPUs)
|
||||
|
||||
# -----------------------------------
|
||||
# Application
|
||||
# -----------------------------------
|
||||
PORT=8000
|
||||
PORT=8001
|
||||
HOST=0.0.0.0
|
||||
FLASK_APP=app
|
||||
FLASK_DEBUG=0
|
||||
@@ -30,13 +55,13 @@ FLASK_DEBUG=0
|
||||
# -----------------------------------
|
||||
# Gunicorn (production)
|
||||
# -----------------------------------
|
||||
GUNICORN_WORKERS=2
|
||||
GUNICORN_WORKERS=3
|
||||
GUNICORN_THREADS=4
|
||||
GUNICORN_TIMEOUT=300
|
||||
GUNICORN_TIMEOUT=600
|
||||
GUNICORN_LOGLEVEL=info
|
||||
|
||||
# -----------------------------------
|
||||
# Marker
|
||||
# Paths
|
||||
# -----------------------------------
|
||||
MARKER_OUTPUT_DIR=/app/conversion_results
|
||||
RESULTS_DIR=/app/conversion_results
|
||||
UPLOAD_DIR=/app/uploads
|
||||
|
||||
Reference in New Issue
Block a user