Grammalecte  History Of Ticket 68c6b9a36f973c82773ffab17c67bf077cf097a2

Artifacts Associated With Ticket 68c6b9a36f973c82773ffab17c67bf077cf097a2

  1. Ticket change [327409fd96] (rid 11874) by thelittlefireman on 2020-10-06 12:06:20:

    1. foundin initialized to: "1.12.1"
    2. icomment:
      Bonjour,
      J'essaie de créer un conteneur docker pour lancer Grammalecte en docker mais lorsque je démarre le serveur, celui-ci reste bloqué (attend un appui sur la touche entrée ???) et ne se lance que lorsque je quitte le docker. Le serveur ne semble pas lancé, j'ai testé un curl http://localhost:8080/ mais j'obtiens une erreur "connection reset"
      
      Créer le conteneur :
      docker build -t grammalecte:latest .
      
      Démarrer le conteneur :
      docker run --rm -p 8080:8080 --name gr grammalecte:latest
      
      Dockerfile
      ```
      FROM python:3-alpine AS src
      
      ENV VERSION 1.12.2
      
      RUN apk add --update --no-cache \
            unzip \
            wget \
       && wget http://www.dicollecte.org/grammalecte/zip/Grammalecte-fr-v${VERSION}.zip \
       && unzip Grammalecte-fr-v${VERSION}.zip -d /srv
      
      FROM python:3-alpine
      
      COPY --from=src /srv/ /srv
      
      EXPOSE 8080
      
      CMD python /srv/grammalecte-server.py -p 8080 -t -mp 1
      
      ```
      
    3. login: "thelittlefireman"
    4. mimetype: "text/plain"
    5. private_contact initialized to: "666251e9bf5de6378f5514a360268b0948bc6342"
    6. severity initialized to: "Severe"
    7. status initialized to: "Open"
    8. title initialized to: "[FR] Grammalecte dans un container docker"
    9. type initialized to: "Code_Defect"
  2. Ticket change [6aedc5b38e] (rid 11875) by olr on 2020-10-06 14:45:00:

    1. icomment:
      Bonjour,
      
      Je ne connais Docker que de nom. Ce que je vais vous dire n’est donc que suppositions.
      
      Attendu que le serveur utilise un ProcessPoolExecutor, même avec un seul processus dédié à la tâche du correcteur grammatical, j’imagine qu’il y a peut-être un réglage à effectuer pour le processus dédié.
      
      L’autre possibilité, c’est que le serveur Bottle.py (https://bottlepy.org/docs/dev/) sur lequel se base Grammalecte a besoin (lui aussi) d’un configuration particulière.
      
      À mon avis, c’est de l’un de ces points, voire des deux, que vient le problème.
      
    2. login: "olr"
    3. mimetype: "text/x-fossil-plain"
    4. priority changed to: "Immediate"
    5. resolution changed to: "Open"
    6. subsystem changed to: "Grammalecte_Core"
  3. Ticket change [60f672f0eb] (rid 11876) by olr on 2020-10-06 14:50:43:

    1. icomment:
      Par ailleurs, l’adresse http://www.dicollecte.org/ est obsolète, utilisez https://grammalecte.net
      
    2. login: "olr"
    3. mimetype: "text/x-fossil-plain"
  4. Ticket change [1df036563e] (rid 11877) by thelittlefireman on 2020-10-07 16:59:55:

    1. icomment:
      Merci pour vos retours. J'ai réussi à le faire tourner correctement.
      Il faut ajouter l'argument "ENV PYTHONUNBUFFERED TRUE" pour éviter que les logs soient stocké dans un buffer et bloque le programme python.
      
      Donc pour info, vous pouvez ajouter ces informations dans votre répo :
      
      Dockerfile:
      ```
      FROM python:3-alpine AS src
      
      ENV VERSION 1.12.2
      
      RUN apk add --update --no-cache \
            unzip \
            wget \
       && wget https://grammalecte.net/grammalecte/zip/Grammalecte-fr-v${VERSION}.zip \
       && unzip Grammalecte-fr-v${VERSION}.zip -d /srv
      
      FROM python:3-alpine
      
      COPY --from=src /srv/ /srv
      
      ENV PYTHONUNBUFFERED TRUE
      
      EXPOSE 8080
      
      WORKDIR /srv
      
      ENTRYPOINT ["python3"]
      
      CMD ["grammalecte-server.py","-ht", "0.0.0.0","-p","8080","-t"]
      ```
      
      Créer le conteneur :
      `docker build -t grammalecte:latest .`
      
      Lancer le conteneur :
      
      `docker run --rm -p 8080:8080 --name gr grammalecte:latest`
      
    2. login: "thelittlefireman"
    3. mimetype: "text/x-fossil-plain"
  5. Ticket change [e8c93881a6] (rid 11878) by thelittlefireman on 2020-10-07 17:07:49:

    1. icomment:
      Pour info :
      
      https://github.com/thelittlefireman/docker-grammalecte
      
      https://hub.docker.com/r/thelittlefireman/docker-grammalecte
      
    2. login: "thelittlefireman"
    3. mimetype: "text/x-fossil-plain"
  6. Ticket change [5409afff19] (rid 11883) by olr on 2020-10-08 13:30:14:

    1. icomment:
      Merci.
      J’ai ajouté votre fichier au dépôt.
      
    2. login: "olr"
    3. mimetype: "text/x-fossil-plain"
    4. resolution changed to: "Rejected"
    5. status changed to: "Fixed"
    6. type changed to: "Installation"
  7. Ticket change [16cb6efd06] (rid 11886) by thelittlefireman on 2020-10-09 13:43:57:

    1. icomment:
      merci :)
      
      Vous devriez juste renommer votre fichier "Dockerfile.txt" en "Dockerfile" le nom est important pour la compilation rapide du conteneur.
      
      Vous pouvez également (si vous le souhaitez) ajouter une routine pour créer le conteneur automatiquement et le distribuer sur https://hub.docker.com/
      
    2. login: "thelittlefireman"
    3. mimetype: "text/x-fossil-plain"
  8. Ticket change [6ad3baa055] (rid 11887) by thelittlefireman on 2020-10-09 13:45:04:

    1. icomment: "* "dockerfile.txt" ==> "Dockerfile""
    2. login: "thelittlefireman"
    3. mimetype: "text/x-fossil-plain"
  9. Ticket change [162440b455] (rid 11894) by olr on 2020-10-10 06:56:00:

    1. icomment:
      “dockerfile.txt” will become “Dockerfile” in the downloadable Grammalecte package.
      
    2. login: "olr"
    3. mimetype: "text/x-fossil-plain"
    4. resolution changed to: "Fixed"
  10. Ticket change [8e05082c1e] (rid 11895) by olr on 2020-10-10 06:56:25:

    1. login: "olr"
    2. mimetype: "text/x-fossil-plain"
    3. status changed to: "Closed"