knaw-huc / loghi

MIT License
103 stars 16 forks source link

docker: Error response from daemon: pull access dnied for docker.laypa #12

Closed maru-rei closed 1 year ago

maru-rei commented 1 year ago

Hi, I'm trying to run Loghi on Ubuntu 22.04.2 LTS.

I'm trying this on a real Ubuntu system instead of WSL (had different problems with that) but I can't get past the following error when running na-pipeline.sh (full output at the end of this post):

Unable to find image 'docker.laypa:latest' locally
docker: Error response from daemon: pull access denied for docker.laypa, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

Running docker images --all shows the image should there:

REPOSITORY                   TAG       IMAGE ID       CREATED        SIZE
loghi/docker.htr             latest    c40d09048d6b   2 days ago     11.9GB
<none>                       <none>    407ac057a38f   2 days ago     11.9GB
loghi/docker.laypa           latest    3e0ba12084de   8 days ago     16GB
loghi/docker.loghi-tooling   latest    80cc993ece02   8 days ago     2.42GB
hello-world                  latest    9c7a54a9a43c   3 months ago   13.3kB

What I've done so far is I initially followed the quickstart guide but got errors (different from the current issue). So I manually pulled the docker images, more errors. Eventually manually cloned the four submodules (git submodule update --init --recursive gives permission errors) and built them following the guide (using ./buildAll.sh). This process has given me the most success on WSL where I can run Loghi on the CPU but not the GPU. No such luck on this system, however.

System information:

Full output/errors running ./na-pipeline.sh ~/loghi/input/:

***@***:~/loghi/loghi$ ./na-pipeline.sh ~/loghi/input/
/tmp/tmp.WjrhEvCdjY
using GPU 0
starting Laypa baseline detection
Unable to find image 'docker.laypa:latest' locally
docker: Error response from daemon: pull access denied for docker.laypa, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Exception in thread "main" java.nio.file.NoSuchFileException: /home/***/loghi/input/page
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:432)
    at java.base/java.nio.file.Files.newDirectoryStream(Files.java:472)
    at nl.knaw.huc.di.images.minions.MinionExtractBaselines.main(MinionExtractBaselines.java:402)
starting Loghi HTR
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
10:10:02.269 [main] ERROR nl.knaw.huc.di.images.minions.MinionCutFromImageBasedOnPageXMLNew - /home/***/loghi/input/page/voorbeeld_1.xml does not exist. Continuing
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Exception in thread "main" java.io.FileNotFoundException: /tmp/tmp.WjrhEvCdjY/results.txt (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
    at java.base/java.io.FileReader.<init>(FileReader.java:103)
    at nl.knaw.huc.di.images.minions.MinionLoghiHTRMergePageXML.fillDictionary(MinionLoghiHTRMergePageXML.java:289)
    at nl.knaw.huc.di.images.minions.MinionLoghiHTRMergePageXML.main(MinionLoghiHTRMergePageXML.java:213)
detecting language...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
10:10:05.186 [pool-1-thread-1] INFO nl.knaw.huc.di.images.minions.MinionDetectLanguageOfPageXml - page: processing file...
10:10:05.202 [pool-1-thread-1] ERROR nl.knaw.huc.di.images.minions.MinionDetectLanguageOfPageXml - Cannot read page file: /home/***/loghi/input/page
java.nio.file.NoSuchFileException: /home/***/loghi/input/page
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
    at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
    at java.base/java.nio.file.Files.newByteChannel(Files.java:422)
    at java.base/java.nio.file.Files.readAllBytes(Files.java:3206)
    at java.base/java.nio.file.Files.readString(Files.java:3284)
    at java.base/java.nio.file.Files.readString(Files.java:3243)
    at nl.knaw.huc.di.images.stringtools.StringTools.readFile(StringTools.java:250)
    at nl.knaw.huc.di.images.pagexmlutils.PageUtils.readPageFromFile(PageUtils.java:298)
    at nl.knaw.huc.di.images.minions.MinionDetectLanguageOfPageXml.lambda$main$2(MinionDetectLanguageOfPageXml.java:132)
    at nl.knaw.huc.di.images.minions.MinionDetectLanguageOfPageXml.run(MinionDetectLanguageOfPageXml.java:162)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "pool-1-thread-1" java.lang.NullPointerException
    at nl.knaw.huc.di.images.minions.MinionDetectLanguageOfPageXml.run(MinionDetectLanguageOfPageXml.java:164)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
MinionSplitPageXMLTextLineIntoWords...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/src/loghi-tooling/minions/target/appassembler/repo/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Exception in thread "main" java.nio.file.NoSuchFileException: /home/***/loghi/input/page
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:432)
    at java.base/java.nio.file.Files.newDirectoryStream(Files.java:472)
    at nl.knaw.huc.di.images.minions.MinionSplitPageXMLTextLineIntoWords.main(MinionSplitPageXMLTextLineIntoWords.java:85)
stefanklut commented 1 year ago

Hi, thank you for bringing this to our attention. I already see the issue our na-pipeline says DOCKERLAYPA=loghi/docker.laypa, but does not use this. You can change the docker name from docker.laypa to loghi/docker.laypa or $DOCKERLAYPA in this line https://github.com/knaw-huc/loghi/blob/f486a3f1df39295b5e448e7f5f0b3d9191745f64/na-pipeline.sh#L82C16-L82C205 This appears to have gone wrong during a merge. Will push this fix shortly

stefanklut commented 1 year ago

Fixed in https://github.com/knaw-huc/loghi/commit/ea238234356649b957ecc2d156b322e5396a2b2e . Could you check if this resolves all your issues? Thanks in advance

maru-rei commented 1 year ago

ea23823 solved all issues, many thanks!