#caching apt-get?
1 messages · Page 1 of 1 (latest)
Hey Colin,
This kind of "just works" for me in this project for example:
https://github.com/levlaz/daggerverse/blob/main/vapor/src/main.py#L34
that part gets cached when I rerun it - if you are seeing something different, could you point me to your code (assuming its open somewhere)
Note, I am using Dagger Modules, but nothing about caching should be different in this case.
thanks, here's what I'm doing now: https://github.com/dbt-labs/dbt-spark/pull/972/files#diff-ca1b9f8fafcab3a8c6df7e520e725035642f58e54df0d88402a7a61fac5578b6R93
I actually think this does work now
Awesome, I am running it locally to take a peek too.
Curious, have you tried to use the dagger CLI? It adds a nice TUI layer that makes some thing easier to grok in the terminal.
It would basically replace python dagger/run_dbt_spark_tests.py with dagger run python dagger/run_dbt_spark_tests.py
I haven't tried it yet but will take a look
Hey Colin! Dagger works the the same way as Dockerfiles in a sense that it's generally advisable to first install system dependencies before adding your source code so you can get the maximum out of the cache. In your script I see that you're calling with_directory before installing your os reqs. That'll cause any files which change in any of those dirs to invalidate the cache and re-trigger the os_reqs exec
cc @flat glen forgot to reply
that makes a lot of sense, will re-order