-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 5.3 and above always crash (fasttext) #25
Comments
I'm working my way through this and haven't gotten all the way there yet, but I did resolve the "No such file or directory" issue. The |
If you create a FROM alpine as ftbuild
RUN apk update && apk add \
build-base \
wget \
git \
unzip \
&& rm -rf /var/cache/apk/*
RUN git clone https://github.com/facebookresearch/fastText.git /tmp/fastText && \
rm -rf /tmp/fastText/.git* && \
mv /tmp/fastText/* / && \
cd / && \
make
RUN wget https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin
RUN wget https://languagetool.org/download/ngram-lang-detect/model_ml50_new.zip
FROM erikvl87/languagetool
COPY --chown=languagetool --from=ftbuild /fasttext .
COPY --chown=languagetool --from=ftbuild /model_ml50_new.zip .
COPY --chown=languagetool --from=ftbuild /lid.176.bin .
ENV Java_Xms=512m
ENV Java_Xmx=1500m
ENV langtool_fasttextBinary=/LanguageTool/fasttext
ENV langtool_ngramLangIdentData=/LanguageTool/model_ml50_new.zip
ENV langtool_fasttextModel=/LanguageTool/lid.176.bin You can then build it with: docker build -t docker-languagetool-fasttext . And then you would run it like so (this is based off your command you provided above): docker run -d --name="Languagetool" \
-p 8081:8010/tcp \
-e langtool_languageModel=/ngrams \
-v "/mnt/hdd1/languagetool/ngrams":"/ngrams" \
--restart=unless-stopped \
docker-languagetool-fasttext |
Yes, it starts and i have the same problem with
|
Sorry that I've kept you waiting. I unfortunately didn't had the time yet to look into this. I'll do my best to take a look soon. You can do this by increasing the
Alternatively, take a look at the Java heap size settings explained over here: |
@Aculeasis, The provided solution of @dprothero seems to work here as well. I think the example above is useful to include in the |
Sorry for delay. |
@Aculeasis That should be a question for the official LanguageTool developers. From what I could find is that they don't have an official set of requirements regarding memory configuration:
|
Is there a reason this can't be included in the docker image? |
erikvl87/languagetool:5.2 works fine:
But newer versions already crash :(
I built fasttext from here and downloaded, probably, lid.176.bin from here.
My docker runner:
docker version:
So, what am I doing wrong?
The text was updated successfully, but these errors were encountered: