Skip to content

Commit c57ea74

Browse files
authored
Enhance Dockerfile: Pre-download tiktoken
Enhance Dockerfile: Pre-download tiktoken
2 parents d024053 + 21d159d commit c57ea74

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

make/main/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ RUN uv sync --no-cache-dir $(test -n "$MIRROR" && echo "-i $MIRROR") && \
2828
COPY sdk /opt/sdk
2929
RUN uv pip install --no-cache-dir /opt/sdk $(test -n "$MIRROR" && echo "-i $MIRROR") && \
3030
uv cache clean
31+
32+
# Pre-download tiktoken cl100k_base model to avoid network issues during runtime
33+
RUN uv run python -c "import tiktoken; enc = tiktoken.get_encoding('cl100k_base')"
3134
# Layer 2: copy backend code
3235
COPY backend /opt/backend
3336

@@ -40,4 +43,4 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
4043
WORKDIR /opt
4144

4245
# Expose the service port
43-
EXPOSE 5010
46+
EXPOSE 5010

0 commit comments

Comments
 (0)