Skip to content

Commit 53b5974

Browse files
committed
load the sentence transformers in dockerfile
1 parent 6b57e49 commit 53b5974

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ COPY requirements.txt /app/
3333
# Install Python dependencies
3434
RUN pip install --no-cache-dir -r requirements.txt
3535

36+
# Preload the sentence transformer model to cache
37+
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
38+
3639
# Copy the application source code into the container
3740
COPY . /app
3841

0 commit comments

Comments
 (0)