slub / ocrd_controller

Path to network implementation of OCR-D
MIT License
6 stars 3 forks source link

Problem while starting controller container #8

Closed markusweigelt closed 2 years ago

markusweigelt commented 2 years ago

Tries to start container from base ocrd directory. Had to set --env-file explicit cause default .env is used from docker-compose without using parameter --project-directory.

$ docker-compose --env-file C:/Users/weigelt/Work/ocr-d/kitodo_production_ocrd/.env -f ./_modules/ocrd_controller/docker-compose.yml up -d --build ocrd-controller
[+] Building 2.3s (28/28) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                      0.0s
 => => transferring dockerfile: 32B                                                                                                                                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                         0.1s
 => => transferring context: 34B                                                                                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/ocrd/all:maximum-git                                                                                                                                                                                                           1.8s
 => [internal] load build context                                                                                                                                                                                                                                         0.0s
 => => transferring context: 72B                                                                                                                                                                                                                                          0.0s
 => [ 1/23] FROM docker.io/ocrd/all:maximum-git@sha256:c89329357099b6d8d67b1222f09b7222f717792b56bd59881b2580c030b4c705                                                                                                                                                   0.0s
 => CACHED [ 2/23] RUN apt-get update &&     apt-get install -y apt-utils wget git openssh-server rsyslog  &&     apt-get clean                                                                                                                                           0.0s
 => CACHED [ 3/23] RUN ssh-keygen -A                                                                                                                                                                                                                                      0.0s
 => CACHED [ 4/23] RUN mkdir /run/sshd /.ssh                                                                                                                                                                                                                              0.0s
 => CACHED [ 5/23] RUN echo Banner none >> /etc/ssh/sshd_config                                                                                                                                                                                                           0.0s
 => CACHED [ 6/23] RUN echo PrintMotd no >> /etc/ssh/sshd_config                                                                                                                                                                                                          0.0s
 => CACHED [ 7/23] RUN echo PermitUserEnvironment yes >> /etc/ssh/sshd_config                                                                                                                                                                                             0.0s
 => CACHED [ 8/23] RUN echo PermitUserRC yes >> /etc/ssh/sshd_config                                                                                                                                                                                                      0.0s
 => CACHED [ 9/23] RUN echo X11Forwarding no >> /etc/ssh/sshd_config                                                                                                                                                                                                      0.0s
 => CACHED [10/23] RUN echo AllowUsers ocrd >> /etc/ssh/sshd_config                                                                                                                                                                                                       0.0s
 => CACHED [11/23] RUN echo "cd /data" >> /etc/profile                                                                                                                                                                                                                    0.0s
 => CACHED [12/23] RUN echo 'umask $UMASK' >> /etc/profile                                                                                                                                                                                                                0.0s
 => CACHED [13/23] RUN /usr/sbin/sshd -t                                                                                                                                                                                                                                  0.0s
 => CACHED [14/23] COPY start-sshd.sh /usr/bin/                                                                                                                                                                                                                           0.0s
 => CACHED [15/23] WORKDIR /build                                                                                                                                                                                                                                         0.0s
 => CACHED [16/23] RUN ln /usr/bin/python3 /usr/bin/python                                                                                                                                                                                                                0.0s
 => CACHED [17/23] RUN git -C core fetch origin pull/652/head:workflow-server                                                                                                                                                                                             0.0s
 => CACHED [18/23] RUN git -C core checkout workflow-server                                                                                                                                                                                                               0.0s
 => CACHED [19/23] RUN for venv in /usr/local /usr/local/sub-venv/*; do . $venv/bin/activate && make -C core install PIP_INSTALL="pip install -e"; done                                                                                                                   0.0s
 => CACHED [20/23] RUN git -C workflow-configuration pull origin master                                                                                                                                                                                                   0.0s
 => CACHED [21/23] RUN . /usr/local/bin/activate && make -C workflow-configuration install                                                                                                                                                                                0.0s
 => CACHED [22/23] COPY ocrd_logging.conf /etc                                                                                                                                                                                                                            0.0s
 => CACHED [23/23] WORKDIR /data                                                                                                                                                                                                                                          0.0s
 => exporting to image                                                                                                                                                                                                                                                    0.3s
 => => exporting layers                                                                                                                                                                                                                                                   0.0s
 => => writing image sha256:8c29785924048f5d609220b2f80eb33eac4a9cf7e1f5b3bdfba9c183436b7972                                                                                                                                                                              0.0s
 => => naming to docker.io/bertsky/ocrd_controller                                                                                                                                                                                                                        0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 1/2
 - Network kitodo_production_ocrd_default              Created                                                                                                                                                                                                            0.9s
 - Container kitodo_production_ocrd-ocrd-controller-1  Starting                                                                                                                                                                                                           1.3s
Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: signal: segmentation fault, stdout: , stderr:: unkn
own
bertsky commented 2 years ago

Have you tried with bertsky/ocrd_controller from Dockerhub already? Not sure about the ocrd/all version used here.

But I also have not seen that kind of error before. Can you start the built container manually?

markusweigelt commented 2 years ago

No but i just tried it with the same problem. Seams to be a problem with WSL and GPU. I do not have an NVIDIA GPU. Is this necessary for our development?

When i uncomment the reservations of deployment resources it seams to work.

reservations:
         devices:
           - capabilities: [gpu]
              count: 1 # share GPU device across workers (for multi-GPU: use swarm)

Is this a necessary config or nice to have?

markusweigelt commented 2 years ago

Ok the count seams to be the problem. When I uncomment that line than container starts.

bertsky commented 2 years ago

Oh, I see! Thanks for digging. So, surprisingly, the semantics is "at least", not "up to".

I did not grasp that directly from the documentation.

So how do we get "up to" configured?

For the moment, we should use all though (which is "up to").

markusweigelt commented 2 years ago

all is apparently also too much and didn't worked. So only without count has worked on my system.

bertsky commented 2 years ago

all is apparently also too much and didn't worked. So only without count has worked on my system.

Oh, I see. Thanks!

See https://github.com/bertsky/ocrd_controller/commit/e58e4e4be53a8bb107e3dc6c67eb7ed5fb70e1e9

bertsky commented 2 years ago

Ah, sorry, did not see your PR earlier!