From 039944cae2cb15ae131bd732d152d9c28d07ac94 Mon Sep 17 00:00:00 2001 From: Anton Evseev <78427278+slayoffer@users.noreply.github.com> Date: Sat, 31 Jan 2026 18:16:42 +1000 Subject: [PATCH] feat(docker): preload tiktoken encoding during build (#249) Pre-download cl100k_base tiktoken encoding (used by OpenAI models) during Docker build to avoid runtime download delays. Applied to both api-only and standalone stages. Co-authored-by: Claude Opus 4.5 --- docker/standalone/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/standalone/Dockerfile b/docker/standalone/Dockerfile index 8efdaeed..939ed36b 100644 --- a/docker/standalone/Dockerfile +++ b/docker/standalone/Dockerfile @@ -185,6 +185,7 @@ print('Downloading embedding model...'); \ SentenceTransformer('BAAI/bge-small-en-v1.5'); \ print('Downloading cross-encoder model...'); \ CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2'); \ +print('Downloading tiktoken encoding...'); import tiktoken; tiktoken.get_encoding('cl100k_base'); \ print('Models cached successfully')" && break; \ if [ $i -lt $MAX_RETRIES ]; then \ echo "Attempt $i failed, retrying in ${RETRY_DELAY}s..."; \ @@ -310,6 +311,7 @@ print('Downloading embedding model...'); \ SentenceTransformer('BAAI/bge-small-en-v1.5'); \ print('Downloading cross-encoder model...'); \ CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2'); \ +print('Downloading tiktoken encoding...'); import tiktoken; tiktoken.get_encoding('cl100k_base'); \ print('Models cached successfully')" && break; \ if [ $i -lt $MAX_RETRIES ]; then \ echo "Attempt $i failed, retrying in ${RETRY_DELAY}s..."; \