Closed arokem closed 1 year ago
Update: seems like this is not notebook-specific. I get a similar issue when calling caliban shell --nogpu
. Updating the title of the issue accordingly.
Hey @arokem ! I'm sure that the issue lives right at this line; the output of your Docker build looks different from mine, so my simple "get the image ID" parsing has failed us.
What version of Docker are you on?
I'm no longer at Google so I'll ask @ajslone to take a look at this problem. The idea solution would be if caliban could pass some flag to docker build
that would generate structured logging we could read, instead of what I'm doing here.
There is a python library for Docker, but it is very limited, and couldn't (at the time) support the custom Dockerfile builds we do in Caliban.
Thanks for the quick reply here. I'm on Docker version 20.10.0, build 7287ab3
Sorry for the delay in looking at this! I'll have a look and try to get a fix in.
@ajslone ping!
Ach, my apologies, been a bit swamped. I'll have a look.
I'm running into the same issue when trying to run caliban shell --nogpu
on a Macbook Pro.
jake-mbp:basic_example jakewestfall$ caliban shell --nogpu
I0528 13:53:41.221027 140735501751168 build.py:731] Running command: docker build --rm -f- /Users/jakewestfall/Desktop/projects/training/python/2020-10-08_caliban/basic_example
#1 [internal] load build definition from Dockerfile
#1 sha256:f6fa4fe0bc2c1f19770d26b64a8b5a9035209a7fae8990381471f751b3a7a012
#1 transferring dockerfile: 1.01kB 0.0s done
#1 DONE 0.0s
[...lots of text snipped...]
#16 exporting to image
#16 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
#16 exporting layers
#16 exporting layers 0.3s done
#16 writing image sha256:a14cb50a19ccd5dc35a94f92ef33561205c270654d7b9d8ed6c602902caa9ac8 done
#16 DONE 0.3s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
I0528 13:56:26.669191 140735501751168 run.py:335] Running command: docker run --ipc host -w /usr/app -u 501:20 -v /Users/jakewestfall/Desktop/projects/training/python/2020-10-08_caliban/basic_example:/usr/app -it --entrypoint /bin/bash -v /Users/jakewestfall:/home/jakewestfall them
Unable to find image 'them:latest' locally
docker: Error response from daemon: pull access denied for them, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
I'm on Docker version 20.10.6, build 370c289
It looks like in docker 20.10.5 the following line was added to the docker build
output:
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
So apparently caliban is grabbing the last word of this last line thinking it is the image ID, a strategy which used to work in older versions of docker.
I imagine a hack similar to what @arokem posted would work for my case. But it seems that more generally the image id could be appearing in different locations depending on the user's docker version. So maybe a more acceptable hack would be to grab the last word in the docker build output that starts with sha256:
.
Hey all,
Apologies that this issue has gone unaddressed for so long. I'm not longer at Google, and @ajslone is the maintainer of the project — I'm not sure what he is up to here.
I still have admin access to the project, and would be thrilled to review and merge any fixes that y'all come up. I think
So maybe a more acceptable hack would be to grab the last word in the docker build output that starts with sha256
is a great fix, and more in the spirit of what the code was trying to do in the first place. (I originally attempted to use the python library that Docker provides for this, but it wasn't possible to do things like stream output back to the user from the build process, so I went this shell-out way.)
Cheers, and apologies for this! ~Sam
I'm running into the same issue when trying to run caliban shell --nogpu
on a MacOS Monterey version 12.0.1
I've finally fixed this over at #109. I'll merge this shortly. Thanks all!
Okay, this fix is released as 0.4.2.
FYI, I'll be slowly ramping up on Caliban and getting some more work done here :)
Hello! Thanks again for this great project.
Running on a mac laptop, having installed caliban with pip, I tried the following:
Looks like maybe the docker command is malformed? Why is that
0.0s
in there?