[Docker] Compile Python bytecode at image build time (#55422)

Signed-off-by: Nils Matteson <nilsmatteson@icloud.com>
Co-authored-by: Simon Mo <simon.mo@hey.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Nils Matteson
2026-10-01 02:20:17 +00:00
committed by GitHub
co-authored by Simon Mo mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 7314360c9e
commit 76d3929916
8 changed files with 9 additions and 0 deletions
+1
View File
@@ -906,6 +906,7 @@ ENV UV_INDEX_STRATEGY="unsafe-best-match"
ENV UV_LINK_MODE=copy
ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python
ENV UV_CACHE_DIR=/opt/uv/cache
ENV UV_COMPILE_BYTECODE=1
RUN mkdir -p "${UV_PYTHON_INSTALL_DIR}" "${UV_CACHE_DIR}" \
&& chgrp -R 0 /opt/uv \
&& chmod -R g+rwX,a+rX /opt/uv