# =============================================================================
# Hello Motion — Self-Hosted Worker Debug Image
#
# Simulates the full HY-Motion inference pipeline (model loading, staged
# progress updates, SMPL-format NPZ upload) without a GPU or real weights.
# Use this to verify the complete self-hosted worker pipeline: registration,
# Hatchet connection, progress streaming, S3 upload, and job callback.
#
# Build (from workers/self-hosted/):
#   docker compose build hello-motion
#
# Run:
#   docker run ph-hello-motion:latest ph-worker start --token <portal-token> --portal-url <url>
# =============================================================================

FROM python:3.13-slim

# Hello Motion inference dependencies (CUDA-agnostic — shared across all variants)
COPY poly_hammer_worker/jobs/hello_motion/requirements.txt /tmp/requirements.txt
RUN python -m pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt

# ---------- Install poly-hammer-worker (with jobs package) ----------
COPY . /opt/worker-src
RUN pip install --no-cache-dir /opt/worker-src \
    && python /opt/worker-src/scripts/patch_hatchet_logger.py \
    && rm -rf /opt/worker-src

# ---------- Runtime configuration ----------
ENV PH_JOB_CLASS="poly_hammer_worker.jobs.hello_motion.job.HelloMotionJob"

CMD ["ph-worker", "check-gpu"]
