aidevices commited on
Commit
4532142
·
verified ·
1 Parent(s): 7a5cf26

Sync third-solution for HF Jobs Docker image

Browse files
Files changed (3) hide show
  1. .hf_space_build_stamp +3 -3
  2. Dockerfile +2 -16
  3. remote_entrypoint.py +0 -23
.hf_space_build_stamp CHANGED
@@ -1,4 +1,4 @@
1
- utc=2026-05-05T08:51:00.727648+00:00
2
- github_sha=7f6ac35ec1949ba502ed253b96e29c4f9bfda7a6
3
  run_id=1
4
- nonce=2ecbdccccfd347fa8e8da1ae64f5c921
 
1
+ utc=2026-05-08T08:55:31.419805+00:00
2
+ github_sha=85e7d7d60f17e78371c84f4a2311d3e4d10f7b65
3
  run_id=1
4
+ nonce=45761617674840f7a354628e42b27fba
Dockerfile CHANGED
@@ -1,14 +1,3 @@
1
- # HF Jobs variant of the third-solution image.
2
- #
3
- # commons.infra HFJobRunner submits the container with command:
4
- # ["python", <script_path>, *script_args]
5
- # (see infra/experiment/runners/hf.py). Docker's `command` only overrides CMD,
6
- # not ENTRYPOINT, so this image deliberately leaves ENTRYPOINT/CMD unset and
7
- # relies on commons.infra to invoke `python /app/remote_entrypoint.py`.
8
- #
9
- # The base image (Dockerfile + entrypoint.sh in this directory) stays as-is
10
- # for local `docker run` workflows. Keep this file in sync with the base
11
- # Dockerfile when system/python deps change.
12
 
13
  FROM python:3.12-slim
14
 
@@ -19,13 +8,10 @@ ENV PYTHONUNBUFFERED=1 \
19
  WORKDIR /app
20
 
21
  COPY requirements.txt .
22
- # boto3 + huggingface_hub power remote_entrypoint.py (B2 dataset mirror and
23
- # submission push). Pinned-by-the-base-image deps come from requirements.txt.
24
  RUN pip install --no-cache-dir -r requirements.txt \
25
  && pip install --no-cache-dir boto3 huggingface_hub
26
 
27
  COPY . .
28
 
29
- # No ENTRYPOINT / CMD on purpose: commons.infra HFJobRunner runs
30
- # python /app/remote_entrypoint.py
31
- # inside this image.
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  FROM python:3.12-slim
3
 
 
8
  WORKDIR /app
9
 
10
  COPY requirements.txt .
11
+
 
12
  RUN pip install --no-cache-dir -r requirements.txt \
13
  && pip install --no-cache-dir boto3 huggingface_hub
14
 
15
  COPY . .
16
 
17
+
 
 
remote_entrypoint.py CHANGED
@@ -1,26 +1,3 @@
1
- """Remote-job entrypoint baked into the third-solution HF Jobs image.
2
-
3
- When commons.infra ``HFJobRunner`` runs with ``use_uv=False`` it constructs the
4
- container command as ``["python", <script_path>, *script_args]``. This file is
5
- the ``script_path`` (``/app/remote_entrypoint.py``) inside the image.
6
-
7
- Compared to ``_uv_remote_bootstrap.py`` (used by the UV path), this version:
8
-
9
- * **Skips the source tarball download** — the solver tree (``main.py``,
10
- ``src/``, ``requirements.txt``, ...) is already baked into the image at
11
- ``/app`` by ``Dockerfile.hf``.
12
- * Mirrors the dataset from B2 (S3-compatible) into a working directory using
13
- the ``DATASET_BLOB_PREFIX`` env var and the ``B2_*`` credentials forwarded
14
- via ``cfg.environment``.
15
- * Invokes ``/app/main.py`` via ``runpy`` so its ``from src.predictors`` imports
16
- resolve against the in-image source tree.
17
- * Pushes the produced ``submission.csv`` back to ``HF_REPO_ID`` (the artifact
18
- repo set by commons.infra ``HFJobRunner``).
19
-
20
- Auth: ``HF_TOKEN`` is injected by ``HFJobRunner.secrets``. B2 keys ride along
21
- as plain env vars (commons.infra hardcodes ``secrets={"HF_TOKEN": ...}``).
22
- """
23
-
24
  from __future__ import annotations
25
 
26
  import json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  from __future__ import annotations
2
 
3
  import json