Artples commited on
Commit
bc8583c
·
verified ·
1 Parent(s): 2167d7d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -9
Dockerfile CHANGED
@@ -1,15 +1,24 @@
1
- FROM meyay/languagetool:6.6
2
 
3
- # Hugging Face Docker Spaces expect your app to listen on the configured app_port (default 7860)
 
4
  ENV LISTEN_PORT=7860
5
 
6
- # Optional but recommended: enable fastText auto language detection model download
7
- # Model will be stored in /fasttext inside the container
8
- ENV langtool_fasttextModel=/fasttext/lid.176.bin
9
 
10
- # Reasonable defaults for smaller machines
11
- ENV JAVA_XMS=256m
12
- ENV JAVA_XMX=1536m
13
- ENV LOG_LEVEL=INFO
 
 
 
 
 
 
 
 
14
 
15
  EXPOSE 7860
 
1
+ FROM meyay/languagetool:6.6-8
2
 
3
+ # Hugging Face Spaces routes traffic to the port defined in README.md (app_port).
4
+ # We make LanguageTool listen on the same port.
5
  ENV LISTEN_PORT=7860
6
 
7
+ # Full features: ngrams + fastText
8
+ # Valid ngram langs in this image include: en, de, es, fr, nl
9
+ ENV download_ngrams_for_langs=en,de
10
 
11
+ # Store models on /data if you enabled Persistent Storage in the Space settings.
12
+ # Without Persistent Storage, this still works but will re-download after restarts.
13
+ ENV langtool_languageModel=/data/ngrams
14
+ ENV langtool_fasttextModel=/data/fasttext/lid.176.bin
15
+
16
+ # Performance tuning (adjust to your Space hardware)
17
+ ENV JAVA_XMS=512m
18
+ ENV JAVA_XMX=4096m
19
+ ENV JAVA_GC=ShenandoahGC
20
+
21
+ # Ensure folders exist (harmless if /data is later mounted as a persistent volume)
22
+ RUN mkdir -p /data/ngrams /data/fasttext
23
 
24
  EXPOSE 7860