Skip to content

Commit 18b68bd

Browse files
authored
🐳 preload tiktoken encoding in Dockerfile_ecs (#193)
1 parent d86e64e commit 18b68bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ā€Žsrc/Dockerfile_ecsā€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ RUN groupadd -r appuser && useradd -r -g appuser appuser && \
1414

1515
USER appuser
1616

17+
# Preload tiktoken encoding: https://github.com/aws-samples/bedrock-access-gateway/issues/118
18+
ENV TIKTOKEN_CACHE_DIR=/app/.cache/tiktoken
19+
RUN python3 -c 'import tiktoken_ext.openai_public as tke; tke.cl100k_base()'
20+
1721
ENV PORT=8080
1822

1923
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \

0 commit comments

Comments
Ā (0)