papermerge icon indicating copy to clipboard operation
papermerge copied to clipboard

app.dockerfile and worker.dockerfile, missing packages for arm-based systems (I think)

Open n00B17 opened this issue 3 years ago • 3 comments

  • First of all: I'm a noob, yet sometimes beeing lucky utilizing search engines

**So, what I observed:

  • On a raspberry pi 4 (Linux raspberrypi 5.4.51-v7l+, Docker version 19.03.12, build 48a6621)
  • when trying the git clone https://github.com/ciur/papermerge papermerge-proj; cd papermerge-proj/docker/1.4; docker-compose up -d
  • after a while I get "Error: Please make sure the libxml2 and libxslt development packages are installed."

**What I did to make it work

  • Installing the missing dependencys by hand led to other missing pieces
  • ..and some language specifics when the containers complained in the logs
  • I ended up adding these lines to the "apt-get install" section in app.dockerfile:

libxml2-dev
libxslt-dev
libpq-dev
libffi-dev
python3-dev
libssl-dev
tesseract-ocr
tesseract-ocr-deu
tesseract-ocr-eng \

  • ... and those to the worker.dockerfile:

libxml2-dev
libxslt-dev
libffi-dev
libssl-dev
libpq-dev \

  • and then it seemed to work (as far as I can tell)

**Remark:

  • I got the impression, that with those packages added the worker- and the app-image are nearly the same only difference to be startup scripts.
  • But please, again...take into consideration: I am a noob.
  • And I started this debugging approach a while ago in papermerge version 1.4
  • and I now simply re-did the "add above lines" after docker-compuse up did not work on the 1.5rc ...which still worked

Hope, I didn't waste your time. Regards and thanks a lot for your work.

n00B17 avatar Oct 13 '20 21:10 n00B17

hi @n00B17! Thank you for your report! I am really happy that you managed to run Papermerge on RaspberryPi! At this point I am not sure why those packages were missing as I am not aware of all differences between ubuntu based linux distro and the one you run on RaspberryPI.

I will investigate.

ciur avatar Oct 14 '20 11:10 ciur

  • Em primeiro lugar: sou um novato, mas às vezes tenho sorte ao utilizar mecanismos de pesquisa

** Então, o que observei:

  • Em um raspberry pi 4 (Linux raspberrypi 5.4.51-v7l +, Docker versão 19.03.12, compilação 48a6621)
  • ao tentar o clone git https://github.com/ciur/papermerge papermerge-proj; cd papermerge-proj / docker / 1.4; docker-compose up -d
  • depois de um tempo, recebo "Erro: certifique-se de que os pacotes de desenvolvimento libxml2 e libxslt estejam instalados."

** O que eu fiz para fazer funcionar

  • A instalação manual das dependências que faltavam levou a outras peças que faltavam
  • ..e algumas especificidades de linguagem quando os contêineres reclamaram nos logs
  • Acabei adicionando essas linhas à seção "apt-get install" no app.dockerfile:

libxml2-dev libxslt-dev libpq-dev libffi-dev python3-dev libssl-dev tesseract-ocr tesseract-ocr-deu tesseract-ocr-eng \

  • ... e aqueles para o worker.dockerfile:

libxml2-dev libxslt-dev libffi-dev libssl-dev libpq-dev \

  • e então pareceu funcionar (pelo que eu posso dizer)

**Observação:

  • Tive a impressão de que, com esses pacotes adicionados, a imagem do trabalhador e do aplicativo são quase a mesma única diferença para os scripts de inicialização.
  • Mas, por favor, novamente ... leve em consideração: eu sou um novato.
  • E eu comecei essa abordagem de depuração um tempo atrás, no papermerge versão 1.4
  • e agora simplesmente refiz o "add above lines" depois que docker-compuse up não funcionou no 1.5rc ... que ainda funcionou

Hope, não perdi seu tempo. Atenciosamente e muito obrigado pelo seu trabalho.

  • First of all: I'm a noob, yet sometimes beeing lucky utilizing search engines

**So, what I observed:

  • On a raspberry pi 4 (Linux raspberrypi 5.4.51-v7l+, Docker version 19.03.12, build 48a6621)
  • when trying the git clone https://github.com/ciur/papermerge papermerge-proj; cd papermerge-proj/docker/1.4; docker-compose up -d
  • after a while I get "Error: Please make sure the libxml2 and libxslt development packages are installed."

**What I did to make it work

  • Installing the missing dependencys by hand led to other missing pieces
  • ..and some language specifics when the containers complained in the logs
  • I ended up adding these lines to the "apt-get install" section in app.dockerfile:

libxml2-dev libxslt-dev libpq-dev libffi-dev python3-dev libssl-dev tesseract-ocr tesseract-ocr-deu tesseract-ocr-eng \

  • ... and those to the worker.dockerfile:

libxml2-dev libxslt-dev libffi-dev libssl-dev libpq-dev \

  • and then it seemed to work (as far as I can tell)

**Remark:

  • I got the impression, that with those packages added the worker- and the app-image are nearly the same only difference to be startup scripts.
  • But please, again...take into consideration: I am a noob.
  • And I started this debugging approach a while ago in papermerge version 1.4
  • and I now simply re-did the "add above lines" after docker-compuse up did not work on the 1.5rc ...which still worked

Hope, I didn't waste your time. Regards and thanks a lot for your work.

Hi. Can you post the complete docker-compose code? I am trying to install it in an rpi too. I have little knowledge of docker and docker-compose. I appreciate any help.

adrianoleal avatar Oct 20 '20 00:10 adrianoleal

It is actually not the docker-compose part that I changed.

Trying to describe in detail:

In the commandline I did:

git clone [email protected]:ciur/papermerge.git
cd docker/1.4/

In that directory I then edited 'app.dockerfile' and 'worker.dockerfile. Mine now look like this: app.dockerfile.txt worker.dockerfile.txt

With those changed files it then on the comandline did docker-compose up ...and it worked

Please, if you are a noob like me ... make sure you remove the file extension '.txt' from those files I uploaded before doing the docker-compose up (I had to add them for the upload to this post as the github issue thingy here did not let me otherwise)

In other words, the start of my 'app.dockerfile' looks like this now...:

FROM ubuntu:20.04

LABEL maintainer="Eugen Ciur <[email protected]>"

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
 && apt-get install -y \
                    build-essential \
                    vim \
                    python3 \
                    python3-pip \
                    python3-venv \
                    virtualenv \
                    poppler-utils \
                    git \
                    imagemagick \
                    pdftk-java \
                    apache2 \
                    apache2-dev \
                    locales \
			libxml2-dev \     # lines I added
			libxslt-dev \     # lines I added
			libpq-dev \     # lines I added
			libffi-dev \     # lines I added
			python3-dev \     # lines I added
			libssl-dev \     # lines I added
			tesseract-ocr \     # lines I added
			tesseract-ocr-deu \     # lines I added
			tesseract-ocr-eng \     # lines I added

 && rm -rf /var/lib/apt/lists/* \
 && pip3 install --upgrade pip

#---not end of the file...but anything after this I did not touch---

...and the start of my 'worker.dockerfile' like this:

FROM ubuntu:20.04

LABEL maintainer="Eugen Ciur <[email protected]>"

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
 && apt-get install -y \
                    build-essential \
                    vim \
                    python3 \
                    python3-pip \
                    python3-venv \
                    virtualenv \
                    poppler-utils \
                    git \
                    imagemagick \
                    pdftk-java \
                    locales \
			 libxml2-dev \     # lines I added
			libxslt-dev \     # lines I added
			libffi-dev \     # lines I added
			libssl-dev \     # lines I added
			libpq-dev \     # lines I added

                    tesseract-ocr \
                    tesseract-ocr-deu \
                    tesseract-ocr-eng \
                    tesseract-ocr-fra \
                    tesseract-ocr-rus \
                    tesseract-ocr-ron \
                    tesseract-ocr-spa \
 && rm -rf /var/lib/apt/lists/* \
 && pip3 install --upgrade pip

#---not end of the file...but anything after this I did not touch---

Hope this isn't confusing. Regards

n00B17 avatar Oct 20 '20 19:10 n00B17