online icon indicating copy to clipboard operation
online copied to clipboard

feat(helm): add languagetool support

Open genofire opened this issue 2 years ago • 8 comments

Summary

@Rash419 for you later - still in developing

TODO

  • [ ] add initContainer to download ngram correctly
  • [ ] Testing if it works

genofire avatar Jul 18 '23 13:07 genofire

@Rash419 do you have an tipp - where the Containerfile/Dockerfile for your languagetool container are?

i like to review and take an look inside the setup / start.sh it correct.

In past i use this files: https://github.com/someone-stole-my-name/docker-languagetool/blob/master/misc/init.sh https://github.com/someone-stole-my-name/docker-languagetool/blob/master/misc/ngram.sh

i believe i have to use for the ngram part an init container (and reimplement that script there).

genofire avatar Jul 18 '23 13:07 genofire

@Rash419 do you have an tipp - where the Containerfile/Dockerfile for your languagetool container are?

i like to review and take an look inside the setup / start.sh it correct.

In past i use this files: https://github.com/someone-stole-my-name/docker-languagetool/blob/master/misc/init.sh https://github.com/someone-stole-my-name/docker-languagetool/blob/master/misc/ngram.sh

i believe i have to use for the ngram part an init container (and reimplement that script there).

@genofire tbh I have no idea about languagetool , maybe @timar can help us here

Rash419 avatar Jul 18 '23 14:07 Rash419

@timar

I found /start.sh with:

#!/bin/bash

EXTRAOPTIONS=""
[ -d "/ngrams" ] && EXTRAOPTIONS=" --languageModel /ngrams "

java -cp languagetool-server.jar  org.languagetool.server.HTTPServer --port 8010 --public --allow-origin '*' ${EXTRAOPTIONS}

Could we update it to:

#!/usr/bin/env bash

EXTRAOPTIONS=${EXTRAOPTIONS:-}
JAVAOPTIONS=${JAVAOPTIONS:-}

if [ -d "/ngrams" ]; then
    EXTRAOPTIONS="${EXTRAOPTIONS} --languageModel /ngrams"
fi

for var in ${!LT_*}; do
  EXTRA_LT=true
  echo "${var#'LT_'}="${!var} >> /tmp/config.properties
done

echo JAVAOPTIONS=$JAVAOPTIONS
if [ "$EXTRA_LT" = true ]; then
  EXTRAOPTIONS="${EXTRAOPTIONS} --config /tmp/config.properties"
    echo config.properties:
    echo "$(cat /tmp/config.properties)"
fi
echo EXTRAOPTIONS=$EXTRAOPTIONS

java ${JAVAOPTIONS} -cp languagetool-server.jar org.languagetool.server.HTTPServer --port 8010 --public --allow-origin '*' ${EXTRAOPTIONS}

For:

  • make EXTRAOPTION modifyable
  • add JAVAOPTIONS
  • add LT_ for https://languagetool.org/development/api/org/languagetool/server/HTTPServerConfig.html for e.g. enable PrometheusMetrics

Otherwise I need to reimplement it inside this helmchart again

genofire avatar Jul 20 '23 09:07 genofire

Rash - can we get this merged & closed or actioned in some useful way ? =)

mmeeks avatar Apr 18 '24 09:04 mmeeks

We wait feedback from @timar for your image of languagetools, so i could also create monitoring and ngram loading in this helm-chart.

That does not depends on @Rash419

genofire avatar Apr 18 '24 09:04 genofire

We wait feedback from @timar for your image of languagetools, so i could also create monitoring and ngram loading in this helm-chart.

That does not depends on @Rash419

@genofire I pushed languagetools image with the startup scirpt you suggested.

timar avatar Sep 05 '24 09:09 timar

Hi @genofire! Great news—timar has added the language tool, so you can go ahead. Assigning task back to you 😉

Darshan-upadhyay1110 avatar Sep 05 '24 09:09 Darshan-upadhyay1110

okay, i will take a look in this again ;)

genofire avatar Sep 18 '24 09:09 genofire

@Rash419 what should we do with this PR?

eszkadev avatar Oct 24 '24 09:10 eszkadev

@genofire are you still working on this ? Do you need help to finish this PR ?

Rash419 avatar Oct 28 '24 08:10 Rash419

@Rash419 I think we can safely say @genofire is not working on it. Can we come to a resolution here - finish & merge or close for now - either is fine for me =)

mmeeks avatar Apr 21 '25 20:04 mmeeks