Closed breningham closed 6 years ago
Hi Brendam, I will need to check it later since I have not configured the docker so I don't know what may be the reason for the problem.
For now, since in Sheffield you will not use the Italian or the Spanish servers, can you just comment lines 68, 69, 71 and 72 of Run_TCP_Syntactic_Simplifier_Server.py file? This should make the tool only load the English Syntactic Simplifier Server
Thanks!
That gets it running.. but now i have realised that the DockerFile doesnt load the MainTAE Server, is this by design? how can i get this configured to work with the SAE?
@mirkoperillo you uploaded the docker code for this tool, right? Could you please check Brendan request? Many thanks!
Hi,
My mistake, I forgot to add the instructions to run the Run_TAE_Simplification_Server. You have to add these instructions at the end of docker-entrypoint.sh, here
cd /app/main_TAE_server;
python -u Run_TAE_Simplification_Server.py &
Please @breningham , I know you have a working configuration of this stuff, can you please try these modifications ?
Hi @mirkoperillo
My main problem was that the syntactic server binds only to localhost and therefore it's not available externally (and the ports are not exposed)
Further to increase reliability I have replaced the docker configuration to one with supervisord ... This way when we have a script that stops running for any reason it will automatically restart it.
I will share my config when I get the chance.
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y openjdk-8-jdk &&\
apt-get install -y python-pip python3-pip &&\
apt-get install -y supervisor &&\
apt-get clean
RUN pip install --upgrade pip
RUN mkdir -p /var/log/supervisor
RUN pip install kenlm &&\
pip install gensim &&\
pip install nltk==3.2.5 &&\
pip install sklearn &&\
pip install keras &&\
pip install numpy &&\
pip install h5py &&\
pip install tensorflow===1.3.0 &&\
pip install langdetect &&\
pip install pexpect &&\
pip install unidecode &&\
pip install grammar_check
WORKDIR /app
COPY . /app
# fix sources relative to nltk v3.2.5
RUN sed -i -e 's/from nltk.tokenize/from nltk.tokenize.stanford/' syntactic_simplification_server/simpatico_ss/simpatico_ss/simplify.py
RUN sed -i -e 's/from nltk.tokenize/from nltk.tokenize.stanford/' syntactic_simplification_server/simpatico_ss/simpatico_ss_es/simplify.py
RUN sed -i -e 's/from nltk.tokenize/from nltk.tokenize.stanford/' syntactic_simplification_server/simpatico_ss/simpatico_ss_gl/simplify.py
RUN sed -i -e 's/from nltk.tokenize/from nltk.tokenize.stanford/' syntactic_simplification_server/simpatico_ss/simpatico_ss_it/simplify.py
# copy resource file
COPY ./docker-configs/resources.txt /app/resources.txt
COPY ./docker-configs/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 8080 2020 3030 4040 5050 1414 1515
CMD ["/usr/bin/supervisord"]
And the contents on supervisord.conf :
[supervisord]
;logfile=/var/app/logs/ ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=5 ; (num of main logfile rotation backups;default 10)
loglevel=debug ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
[program:englishPostTagger]
priority=5
directory=/app/data/stanford-postagger-full-2015-04-20
command=java -mx2G -cp "*:lib/*:models/*" edu.stanford.nlp.tagger.maxent.MaxentTaggerServer -model ../data/english.tagger -port 2020
user=root
autostart=true
autorestart=true
[program:lexicalServer]
priority=10
directory=/app/lexical_simplification_server
command=python -u Run_TCP_Lexical_Simplifier_Server.py
user=root
autostart=true
autorestart=true
[program:syntacticalServer]
priority=11
directory=/app/syntactic_simplification_server
command=python -u Run_TCP_Syntactic_Simplifier_Server.py
user=root
autostart=true
autorestart=true
[program:mainTaeServer]
priority=12
directory=/app/main_TAE_server
command=python -u Run_TAE_Simplification_Server.py
user=root
autostart=true
autorestart=true
Also, it's worth noting that the Timeout error still occurs, but because of my modification, if/when it happens it auto restarts and bam! it works again.
I can take @breningham configurations: so his version of Dockerfile and commit to the master of the repo. Actually I don't have the machine resources to test this stuff so I assume that it works.
I pushed to repo the @breningham patch
Hi i have just noticed that the version of TAE that we have running for sheffield periodically exits. According to the logs it seems to crash just after loading Italian simplifier.. Please see the log below.