From 4748432501da65a6667302d534d0f4a4bae70718 Mon Sep 17 00:00:00 2001 From: mmc <853506518@qq.com> Date: Tue, 21 Apr 2026 13:57:44 +0800 Subject: [PATCH] fix: run bootstrap via module to avoid stdlib http shadowing Switch container startup from file execution to module execution so urllib can import stdlib http.client reliably. Co-Authored-By: Claude Opus 4.7 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 915e15f..0a6564d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,4 +28,4 @@ port=os.environ.get('PORT','8317'); \ r=urllib.request.urlopen(f'http://127.0.0.1:{port}/healthz', timeout=3); \ sys.exit(0 if json.load(r).get('ok') else 1)" || exit 1 -CMD ["sh", "-c", "python /app/app/bootstrap_lingma.py && uvicorn app.main:app --host ${HOST:-0.0.0.0} --port ${PORT:-8317}"] +CMD ["sh", "-c", "python -m app.bootstrap_lingma && uvicorn app.main:app --host ${HOST:-0.0.0.0} --port ${PORT:-8317}"]