-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker image is rebuilt for every cluster job submit
#70
Comments
Here is a typical output:
Note that the last copy (copying the current directory) does not use the cache, and the respective layer is pushed. |
Erik, I'll have a look, as you are right both that this shouldn't happen and that it's quite annoying. |
I believe the problem is using If that is indeed so, then one work-around might be to explicitly list all files (including dot files, of course) from the package directory in the copy command. |
@eschnett ah, nice find. Another workaround would be to move your files out of the top level directory; by default, Caliban only includes the folder containing the script you've passed it, and then you have the ability to add more directories with the So you might change:
to:
or something like that, and that should fix it. Hopefully this will help for now! |
Also, we're close to removing the
Shorter command strings are always a bonus! |
@sritchie I have a folder called Thanks for the |
@eschnett almost - instead of:
do this:
I bet that will do the trick (unless @ajslone tells us that |
Yes, this works! Thanks. I would usually write |
Yup, it's implicit (and implicitly required) since Docker can only see
folders from root on up. Nothing below the folder where you run the command
is visible, for security and other mysterious reasons.
…On Tue, Aug 4, 2020 at 10:25 AM Erik Schnetter ***@***.***> wrote:
Yes, this works! Thanks.
I would usually write ./bin/run-einsteintoolkit.sh instead of
bin/run-einsteintoolkit.sh, but that doesn't work here. You cannot have
the initial ./ in the path.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#70 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARAA45M25O6QWXWUWSBC3R7AK4VANCNFSM4PSWG3VQ>
.
--
Sam Ritchie
|
It seems the data directories are added to the Docker image before the apt dependencies are installed. This is the wrong order for me. I agree that this is the right order if one uses large, unchanging data sets (and I'm not advocating to change this order), but this makes the work-around a bit worse for me. |
@eschnett yes, this is a real problem for a few reasons... we have a place where sometimes we need credentials before ANY dependencies, so we can get private deps. But if you don't need that feature, it's very disruptive to rebuild everything before the cache. The solution here could be either:
I want the tool to keep its sane defaults, but I do want to get to a world where our Docker building looks like like building a list of data structures internally, and then taking hints from the user about how to change that build order. |
I don't have an opinion either way. If putting a job script into the root directory could be made to use the cache, I probably wouldn't need data directories. My workflow starts from scratch and produces large output files. |
I notice that Docker rebuilds the image for every
cluster job submit
, and pushes the respective changes to GCP. There is exactly one large layer that is pushed. I assume this is the working directory that is copied into the image. This is annoying since my working directory is quite large (it has a large executable), and I would like to speed this up.I am not making any changes to the working directory. I don't know what changes trigger this. I assume that these are either spurious changes (Caliban/Docker doesn't detect that nothing actually changes), or maybe there is a time stamp that is needlessly updated.
(It would be convenient if
caliban build
had an option--dry_run
that would output the Dockerfile that it generates.)The text was updated successfully, but these errors were encountered: