What's the best way to handle a button like this if you intentionally keep certain dependencies out of Git/GitHub? (e.g. my gpt-2-cloud-run repos [https://github.com/minimaxir/gpt-2-cloud-run] have a 500MB dependency)
Can you do a conditional in the Dockerfile, e.g. download a remote file if using Docker to build with certain parameters?
RUN cache is invalidated when the text (the whole RUN line) itself changes, which can be bad if you update a remote zip archive that you download with `RUN curl ...` and then expect the image to be updated after a simple `docker build`. This also goes for `RUN apk add ...` where the package might have received critical security updates but you're not getting them into your image because the cache is used.
COPY and ADD caches are invalidated when the hash of the actual file content that's added changes, which is usually what you want.
You don't put the docker image in git, so you don't need a conditional in the docker file. You'll only download the dependencies when you make the image assuming you've made it available in that way.
Can you do a conditional in the Dockerfile, e.g. download a remote file if using Docker to build with certain parameters?