fix(ci): fix docker socket mount and implement missing worker logic
Build and Push Docker Images / build-and-push (push) Waiting to run Details

- Adds -v /var/run/docker.sock:/var/run/docker.sock to act_runner options
- Sets DOCKER_HOST=unix:///var/run/docker.sock for runner
- Fixes missing_outputs initialization bug in worker.py
- Implements standard inference path in worker.py using inference.py
This commit is contained in:
fchinembiri 2026-05-01 08:54:02 +02:00
parent 9460b1e870
commit fb4fe5d67f
3 changed files with 26 additions and 6 deletions

View File

@ -258,6 +258,9 @@ def run_job(payload_dict: dict) -> dict:
# Update initial status
update_status(job_id, "running", "fetch_stac", 5, "Fetching STAC items...")
missing_outputs = []
output_urls = {}
try:
# ==========================================
# Stage 1: Fetch STAC
@ -444,10 +447,24 @@ def run_job(payload_dict: dict) -> dict:
output_urls[filename.replace(".","_url")] = storage.presign_get("geocrop-results", result_key)
else:
# Fallback to Legacy/DW-only logic (current implementation)
print(f"[{job_id}] Using baseline logic (DW-only)...")
from dw_baseline import load_dw_baseline_window
# ... (keep existing Stage 3-6 logic for non-hybrid)
# Fallback to Legacy/Standard logic
print(f"[{job_id}] Using standard/ensemble inference logic...")
from inference import run_inference_job
# Create a mock job dict compatible with run_inference_job
job_payload = {
"job_id": job_id,
"lat": payload["lat"],
"lon": payload["lon"],
"radius_m": payload["radius_m"],
"year": payload["year"],
"season": payload["season"],
"model": payload["model"],
"smoothing_kernel": payload["smoothing_kernel"]
}
inference_result = run_inference_job(cfg, job_payload)
output_urls = inference_result.outputs
# Note: indices and true_color not yet implemented
if payload['outputs'].get('indices'):

View File

@ -26,5 +26,6 @@ data:
privileged: true
valid_volumes:
- "**"
docker_host: "tcp://localhost:2375"
docker_host: "unix:///var/run/docker.sock"
options: "-v /var/run/docker.sock:/var/run/docker.sock"
force_pull: true

View File

@ -29,6 +29,8 @@ spec:
value: "k3s-runner"
- name: CONFIG_FILE
value: /config.yaml
- name: DOCKER_HOST
value: unix:///var/run/docker.sock
volumeMounts:
- name: runner-data
mountPath: /data