Pre-downloaded cache of Tiktoken files to speed up application startup, and also because I was slightly annoyed when the "Offline BPE Loader" didn't work on the first try.
- Pull this image into your build process and copy
/var/cache/tiktoken/*
to your image. - Set the
TIKTOKEN_CACHE_DIR
environment variable.
FROM tylergannon/token-cache AS tiktoken
FROM golang:alpine
ENV TIKTOKEN_CACHE_DIR=/var/cache/tiktoken
COPY --from=tiktoken ${TIKTOKEN_CACHE_DIR}/. ${TIKTOKEN_CACHE_DIR}