Docker: fail the build if the search model can't be fetched
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
0f49fe8c1a
commit
2796fab38c
1 changed files with 2 additions and 1 deletions
|
|
@ -28,7 +28,8 @@ COPY . .
|
|||
# The embedding model for semantic search (~34 MB), fetched at build time so the
|
||||
# server never has to download it.
|
||||
ENV MODELS_DIR=/app/models
|
||||
RUN node -e "require('./lib/embeddingModel').load().then(() => console.log('embedding model ready'))"
|
||||
# (No process.exit: forcing an exit while onnxruntime's threads are up aborts node.)
|
||||
RUN node -e "require('./lib/embeddingModel').embed(['test']).then(() => console.log('embedding model ready'), (err) => { console.error(err); process.exitCode = 1; })"
|
||||
|
||||
ENV NODE_ENV=production \
|
||||
PORT=3000
|
||||
|
|
|
|||
Loading…
Reference in a new issue