From 695aedebb8a1fb0713a24d35494acd8a1f3f2167 Mon Sep 17 00:00:00 2001 From: Max Isom Date: Fri, 6 Dec 2024 09:57:01 -0800 Subject: [PATCH] [BLD]: invalidate the layer cache for git clone hnswlib when there's a new commit to the repo --- rust/worker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/worker/Dockerfile b/rust/worker/Dockerfile index b846dd3ecbd..e66b07ef0e1 100644 --- a/rust/worker/Dockerfile +++ b/rust/worker/Dockerfile @@ -3,6 +3,9 @@ FROM rust:1.81.0 AS builder ARG RELEASE_MODE= WORKDIR / + +# ADD with an external URL is always run, so this will trigger a cache invalidation (and thus run the below git clone) if the latest commit changes +ADD "https://api.github.com/repos/chroma-core/hnswlib/commits?per_page=1" hnswlib_commits.json RUN git clone https://github.com/chroma-core/hnswlib.git WORKDIR /chroma/