FROM meyay/languagetool:6.6-8 # Hugging Face Spaces routes traffic to the port defined in README.md (app_port). # We make LanguageTool listen on the same port. ENV LISTEN_PORT=7860 # Full features: ngrams + fastText # Valid ngram langs in this image include: en, de, es, fr, nl ENV download_ngrams_for_langs=en,de # Store models on /data if you enabled Persistent Storage in the Space settings. # Without Persistent Storage, this still works but will re-download after restarts. ENV langtool_languageModel=/data/ngrams ENV langtool_fasttextModel=/data/fasttext/lid.176.bin # Performance tuning (adjust to your Space hardware) ENV JAVA_XMS=512m ENV JAVA_XMX=4096m ENV JAVA_GC=ShenandoahGC # Ensure folders exist (harmless if /data is later mounted as a persistent volume) RUN mkdir -p /data/ngrams /data/fasttext EXPOSE 7860