first commit
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# 容器入口:先确保模型就位,再启动服务。
|
||||
#
|
||||
# download_model.py 是幂等的 —— 模型已存在且 sha256 校验通过时会直接返回,
|
||||
# 因此正常的重启/重建容器不会产生任何下载流量;首次启动才会拉取约 570MB 权重。
|
||||
|
||||
set -e
|
||||
|
||||
echo "[entrypoint] 检查模型 ..."
|
||||
python /app/download_model.py
|
||||
|
||||
echo "[entrypoint] 启动 embedding 服务 ..."
|
||||
exec uvicorn app:app \
|
||||
--host "${HOST:-0.0.0.0}" \
|
||||
--port "${PORT:-8000}" \
|
||||
--workers "${WORKERS:-1}" \
|
||||
--log-level "${LOG_LEVEL:-info}"
|
||||
Reference in New Issue
Block a user