Skip to content

Commit d7461b3

Browse files
rhoulihanclaude
andcommitted
labs: restore MiniLM model-bake stanza lost in Dockerfile auto-merge
Hub main had removed the model layer along with 08-vector-model.sql; the 3-way merge honored that deletion while keeping the branch's mongosh arch fix, yielding an image with no /opt/oracle/models — LOAD_ONNX_MODEL failed with ORA-22288 at init. Restored the validated branch Dockerfile verbatim. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5e7312d commit d7461b3

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

labs/converged-database-lab/docker/Dockerfile.oracle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,27 @@ RUN printf '[mongodb-org-8.0]\nname=MongoDB Repository\nbaseurl=https://repo.mon
1616
&& microdnf install -y mongodb-mongosh \
1717
&& microdnf clean all
1818

19+
# Bake Oracle's prebuilt augmented all-MiniLM-L12-v2 ONNX model into the image so
20+
# every fresh build (and CI) loads identical in-DB embeddings deterministically —
21+
# no network dependency at init time. This is the official model published by
22+
# Oracle Machine Learning: the 26ai docs "ONNX Pipeline Models: Text Embedding"
23+
# page redirects (/pls/topic/lookup?...&id=oml_ai_models_object_storage) to the
24+
# OML-ai-models object-storage bucket whose index lists this exact URL. The zip
25+
# (~122.6 MB) unpacks to all_MiniLM_L12_v2.onnx (~133.3 MB, 384-dim output),
26+
# loaded by docker/init/08-vector-model.sql via DBMS_VECTOR.LOAD_ONNX_MODEL.
27+
# Placed AFTER the ORDS + mongosh layers so their (slow) cache layers are reused
28+
# when only the model layer changes. Fails the build loudly if the URL stops
29+
# resolving rather than baking a broken image.
30+
ARG MINILM_URL=https://adwc4pm.objectstorage.us-ashburn-1.oci.customer-oci.com/p/TtH6hL2y25EypZ0-rrczRZ1aXp7v1ONbRBfCiT-BDBN8WLKQ3lgyW6RxCfIFLdA6/n/adwc4pm/b/OML-ai-models/o/all_MiniLM_L12_v2_augmented.zip
31+
RUN microdnf install -y unzip \
32+
&& microdnf clean all \
33+
&& mkdir -p /opt/oracle/models \
34+
&& curl -fsSL -o /tmp/minilm.zip "$MINILM_URL" \
35+
&& unzip -o /tmp/minilm.zip -d /opt/oracle/models \
36+
&& test -s /opt/oracle/models/all_MiniLM_L12_v2.onnx \
37+
&& rm -f /tmp/minilm.zip \
38+
&& chown -R oracle:oinstall /opt/oracle/models
39+
1940
COPY init/ /container-entrypoint-initdb.d/
2041

2142
COPY scripts/entrypoint.sh /opt/oracle/scripts/entrypoint.sh

0 commit comments

Comments
 (0)