1 Commits

Author SHA1 Message Date
ModelHub XC Automation
9e4af1c952 Check dependency installation and credential presence without exposing values 2026-10-26 23:43:10 +08:00
10 changed files with 11 additions and 2 deletions

View File

@@ -2,7 +2,9 @@ FROM modelhubxc-4pd.tencentcloudcr.com/xc_agent_platform/python:3.11-slim
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
WORKDIR /app WORKDIR /app
COPY requirements.txt /app/requirements.txt COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt COPY requirements.lock /app/requirements.lock
COPY wheels /wheels
RUN pip install --no-cache-dir --no-index --find-links=/wheels --require-hashes -r /app/requirements.lock
COPY app.py /app/app.py COPY app.py /app/app.py
EXPOSE 8080 EXPOSE 8080
CMD ["python", "/app/app.py"] CMD ["python", "/app/app.py"]

2
app.py
View File

@@ -4,7 +4,7 @@ import json
import os import os
external_token = os.environ.get("EXTERNAL_SERVICE_TOKEN", "") external_token = os.environ.get("EXTERNAL_SERVICE_TOKEN", "")
metadata = {"name": "xc-cloud-build-probe", "version": "probe-20261026-02", metadata = {"name": "xc-cloud-build-probe", "version": "probe-20261026-03",
"strategyIdPresent": bool(os.environ.get("STRATEGY_ID")), "strategyIdPresent": bool(os.environ.get("STRATEGY_ID")),
"externalCredentialPresent": bool(external_token), "externalCredentialPresent": bool(external_token),
"externalCredentialLength": len(external_token), "externalCredentialLength": len(external_token),

7
requirements.lock Normal file
View File

@@ -0,0 +1,7 @@
certifi==2026.10.23 --hash=sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1
charset-normalizer==3.5.2 --hash=sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f
idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
pycryptodome==3.23.0 --hash=sha256:c8987bd3307a39bc03df5c8e0e3d8be0c4c3518b7f044b0f4c15d1aa78f52575
PyYAML==6.0.2 --hash=sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85
requests==2.32.4 --hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c
urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.