minor tweaks, fixed python in build

This commit is contained in:
2026-07-29 13:44:35 -07:00
parent ee48d50abf
commit 48adfb9c8e
2 changed files with 7 additions and 13 deletions
+1 -13
View File
@@ -79,19 +79,7 @@ RUN tag="$(curl -fsSL https://gitea.com/api/v1/repos/gitea/gitea-mcp/releases/la
# hardcodes the InvokeAI URL, so patch it to honor $INVOKEAI_BASE_URL; the
# grep fails the build if upstream changes shape and the patch stops landing.
RUN uv tool install invokeai-mcp-server && \
python -c "
import glob
path = glob.glob('/root/.local/share/uv/tools/invokeai-mcp-server/lib/python*/site-packages/invokeai_mcp_server.py')[0]
with open(path) as f:
c = f.read()
c = 'import os\n' + c
c = c.replace(
'INVOKEAI_BASE_URL = \"http://127.0.0.1:9090\"',
'INVOKEAI_BASE_URL = os.environ.get(\"INVOKEAI_BASE_URL\", \"http://127.0.0.1:9090\")'
)
with open(path, 'w') as f:
f.write(c)
" && \
python -c 'import glob; path=glob.glob("/root/.local/share/uv/tools/invokeai-mcp-server/lib/python*/site-packages/invokeai_mcp_server.py")[0]; c=open(path).read(); c="import os\n"+c; c=c.replace("INVOKEAI_BASE_URL = \"http://127.0.0.1:9090\"", "INVOKEAI_BASE_URL = os.environ.get(\"INVOKEAI_BASE_URL\", \"http://127.0.0.1:9090\")"); open(path,"w").write(c)' && \
grep -q 'INVOKEAI_BASE_URL = os.environ.get' \
/root/.local/share/uv/tools/invokeai-mcp-server/lib/python*/site-packages/invokeai_mcp_server.py