fix(ci): fix docker socket mount and implement missing worker logic
Build and Push Docker Images / build-and-push (push) Waiting to run
Details
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:
parent
9460b1e870
commit
fb4fe5d67f
|
|
@ -258,6 +258,9 @@ def run_job(payload_dict: dict) -> dict:
|
||||||
# Update initial status
|
# Update initial status
|
||||||
update_status(job_id, "running", "fetch_stac", 5, "Fetching STAC items...")
|
update_status(job_id, "running", "fetch_stac", 5, "Fetching STAC items...")
|
||||||
|
|
||||||
|
missing_outputs = []
|
||||||
|
output_urls = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# ==========================================
|
# ==========================================
|
||||||
# Stage 1: Fetch STAC
|
# 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)
|
output_urls[filename.replace(".","_url")] = storage.presign_get("geocrop-results", result_key)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Fallback to Legacy/DW-only logic (current implementation)
|
# Fallback to Legacy/Standard logic
|
||||||
print(f"[{job_id}] Using baseline logic (DW-only)...")
|
print(f"[{job_id}] Using standard/ensemble inference logic...")
|
||||||
from dw_baseline import load_dw_baseline_window
|
from inference import run_inference_job
|
||||||
# ... (keep existing Stage 3-6 logic for non-hybrid)
|
|
||||||
|
# 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
|
# Note: indices and true_color not yet implemented
|
||||||
if payload['outputs'].get('indices'):
|
if payload['outputs'].get('indices'):
|
||||||
|
|
|
||||||
|
|
@ -26,5 +26,6 @@ data:
|
||||||
privileged: true
|
privileged: true
|
||||||
valid_volumes:
|
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
|
force_pull: true
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ spec:
|
||||||
value: "k3s-runner"
|
value: "k3s-runner"
|
||||||
- name: CONFIG_FILE
|
- name: CONFIG_FILE
|
||||||
value: /config.yaml
|
value: /config.yaml
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: unix:///var/run/docker.sock
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: runner-data
|
- name: runner-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue