Disable eager bytecode compilation in backend Dockerfile
UV_COMPILE_BYTECODE=1 made `uv sync` bytecode-compile every package upfront, including janome's large sysdic/connections1.py dictionary file, which times out after 60s on smaller build machines (e.g. a Lightsail instance). Modules now compile lazily on first import instead, which has no functional effect.
This commit is contained in:
+4
-2
@@ -4,8 +4,10 @@ RUN pip install --no-cache-dir uv
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV UV_COMPILE_BYTECODE=1 \
|
||||
UV_LINK_MODE=copy \
|
||||
# UV_COMPILE_BYTECODE は無効のまま(janomeの辞書データファイルが巨大で、
|
||||
# 事前バイトコードコンパイルが小規模インスタンスで60秒タイムアウトすることがあるため)。
|
||||
# 初回import時に遅延コンパイルされるだけで動作に影響はない。
|
||||
ENV UV_LINK_MODE=copy \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
# 依存関係だけ先にインストールしてレイヤーキャッシュを効かせる
|
||||
|
||||
Reference in New Issue
Block a user