Document the HF cluster Podman setup and pin Flock b34d6e1
Browse files- README.md +4 -4
- adapter/README.md +34 -12
- inventory.json +2 -2
README.md
CHANGED
|
@@ -47,10 +47,10 @@ different scenario sets. DeepSeek's thinking-off results exclude one Taking-over
|
|
| 47 |
|
| 48 |
Use Linux with Docker and Compose, Python 3.12+, [uv](https://docs.astral.sh/uv/), Git and Git LFS.
|
| 49 |
Rootless Podman is also supported; see the [adapter reference](adapter/README.md#podman).
|
| 50 |
-
On
|
| 51 |
-
|
| 52 |
Git must have access to this private dataset and to `huggingface/flock` and `huggingface/msgboard`.
|
| 53 |
-
The commands below use Flock `main`, tested at commit `
|
| 54 |
|
| 55 |
Log in with a Hugging Face account that can read the private dataset:
|
| 56 |
|
|
@@ -64,7 +64,7 @@ Then get Flock and the tasks:
|
|
| 64 |
```sh
|
| 65 |
git lfs install
|
| 66 |
git clone https://github.com/huggingface/flock.git flock
|
| 67 |
-
git -C flock checkout
|
| 68 |
git clone https://huggingface.co/datasets/HuggingFaceSwarms/collaborative-intelligence-benchmark cib-harbor
|
| 69 |
cd flock
|
| 70 |
```
|
|
|
|
| 47 |
|
| 48 |
Use Linux with Docker and Compose, Python 3.12+, [uv](https://docs.astral.sh/uv/), Git and Git LFS.
|
| 49 |
Rootless Podman is also supported; see the [adapter reference](adapter/README.md#podman).
|
| 50 |
+
On the HF cluster (no Docker on compute nodes), use Podman with the reference's cluster setup,
|
| 51 |
+
including its Docker Hub mirror.
|
| 52 |
Git must have access to this private dataset and to `huggingface/flock` and `huggingface/msgboard`.
|
| 53 |
+
The commands below use Flock `main`, tested at commit `b34d6e1`.
|
| 54 |
|
| 55 |
Log in with a Hugging Face account that can read the private dataset:
|
| 56 |
|
|
|
|
| 64 |
```sh
|
| 65 |
git lfs install
|
| 66 |
git clone https://github.com/huggingface/flock.git flock
|
| 67 |
+
git -C flock checkout b34d6e18fbe487c56468d1e63bf33ced2a2e4840
|
| 68 |
git clone https://huggingface.co/datasets/HuggingFaceSwarms/collaborative-intelligence-benchmark cib-harbor
|
| 69 |
cd flock
|
| 70 |
```
|
adapter/README.md
CHANGED
|
@@ -83,12 +83,25 @@ checked with a scripted fake provider through Pi and Harbor, which shows they ru
|
|
| 83 |
|
| 84 |
## Podman
|
| 85 |
|
| 86 |
-
Docker is the default backend. With rootless Podman 4+:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
- install `podman-compose==1.5.0` into the same environment and set `environment.backend: podman`;
|
| 89 |
-
- create a registries file named by `CONTAINERS_REGISTRIES_CONF` with
|
| 90 |
-
`unqualified-search-registries = ["docker.io"]` (and, if Docker Hub rate-limits you, a
|
| 91 |
-
`[[registry.mirror]]` with `location = "mirror.gcr.io"` for `docker.io`; images are pinned by digest);
|
| 92 |
- wrap `podman-compose`, because Harbor calls `compose exec --no-TTY`, which podman-compose spells `-T`:
|
| 93 |
|
| 94 |
```sh
|
|
@@ -101,13 +114,22 @@ SH
|
|
| 101 |
chmod 700 ~/bin/podman-compose-shim && export PODMAN_COMPOSE_PROVIDER=~/bin/podman-compose-shim
|
| 102 |
```
|
| 103 |
|
| 104 |
-
- in batch jobs without a user systemd session, Podman needs a
|
| 105 |
-
|
| 106 |
-
[`scripts/slurm/podman-node.sh`](https://github.com/huggingface/flock/blob/
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
Harbor's network guard needs the host kernel modules `nft_fib_inet`, `nft_redir` and `nft_chain_nat`
|
| 113 |
(`grep -E "^(nft_fib_inet|nft_redir|nft_chain_nat) " /proc/modules`; modules may also be built into the kernel).
|
|
|
|
| 83 |
|
| 84 |
## Podman
|
| 85 |
|
| 86 |
+
Docker is the default backend. With rootless Podman 4+ (Flock's environment already includes `podman-compose==1.5.0`):
|
| 87 |
+
|
| 88 |
+
- set `environment.backend: podman` in the recipe;
|
| 89 |
+
- create a registries file named by `CONTAINERS_REGISTRIES_CONF`. Pull through a Docker Hub mirror wherever
|
| 90 |
+
many machines share one address, as on the HF cluster (images are pinned by digest, so the bytes are identical).
|
| 91 |
+
Before starting the agent, Harbor checks network-guard support with a small pinned `alpine` container and a
|
| 92 |
+
30-second limit; when throttled Docker Hub pulls make that check time out, Harbor refuses to start the agent
|
| 93 |
+
("cannot change network policy after start").
|
| 94 |
+
|
| 95 |
+
```toml
|
| 96 |
+
unqualified-search-registries = ["docker.io"]
|
| 97 |
+
|
| 98 |
+
[[registry]]
|
| 99 |
+
location = "docker.io"
|
| 100 |
+
|
| 101 |
+
[[registry.mirror]]
|
| 102 |
+
location = "mirror.gcr.io"
|
| 103 |
+
```
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
- wrap `podman-compose`, because Harbor calls `compose exec --no-TTY`, which podman-compose spells `-T`:
|
| 106 |
|
| 107 |
```sh
|
|
|
|
| 114 |
chmod 700 ~/bin/podman-compose-shim && export PODMAN_COMPOSE_PROVIDER=~/bin/podman-compose-shim
|
| 115 |
```
|
| 116 |
|
| 117 |
+
- in batch jobs without a user systemd session (the HF cluster's CPU nodes), Podman needs a private
|
| 118 |
+
`XDG_RUNTIME_DIR`, DNS that does not depend on `systemd-run`, and explicitly scheduled health checks. Flock's
|
| 119 |
+
[`scripts/slurm/podman-node.sh`](https://github.com/huggingface/flock/blob/b34d6e18fbe487c56468d1e63bf33ced2a2e4840/scripts/slurm/podman-node.sh)
|
| 120 |
+
sets up all three. It replaces `PODMAN_COMPOSE_PROVIDER`, so export the shim after it;
|
| 121 |
+
- Harbor clones the task with Git inside the job, so the job also needs Git LFS on `PATH` and the
|
| 122 |
+
dataset credentials (the quickstart's `--add-to-git-credential` login works when the job sees your Git config).
|
| 123 |
+
|
| 124 |
+
On an HF cluster CPU node, from the Flock checkout:
|
| 125 |
+
|
| 126 |
+
```sh
|
| 127 |
+
uv sync --locked
|
| 128 |
+
VENV=$PWD/.venv source scripts/slurm/podman-node.sh
|
| 129 |
+
trap podman_node_cleanup EXIT
|
| 130 |
+
export PODMAN_COMPOSE_PROVIDER=~/bin/podman-compose-shim
|
| 131 |
+
export CONTAINERS_REGISTRIES_CONF=$HOME/registries.conf # the file above, with the mirror
|
| 132 |
+
```
|
| 133 |
|
| 134 |
Harbor's network guard needs the host kernel modules `nft_fib_inet`, `nft_redir` and `nft_chain_nat`
|
| 135 |
(`grep -E "^(nft_fib_inet|nft_redir|nft_chain_nat) " /proc/modules`; modules may also be built into the kernel).
|
inventory.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
| 4 |
"LICENSE": "bfa9f372762062762c414e4b5dbdf896067dd39c4a2ec5f7c3c93469dbda7852",
|
| 5 |
"LICENSE-DATA": "5e7a6e49010ac248c5467d12cfc064201a2d2d78e02004bc6e72a36f6636a5b3",
|
| 6 |
"LICENSE.adapter": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
| 7 |
-
"README.md": "
|
| 8 |
"THIRD_PARTY_NOTICES.md": "30b361cb67a2142b25db00158144c4ddd5ad5c248e2c75bd9b48e2e0fab8fa33",
|
| 9 |
"adapter/LICENSE.adapter": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
| 10 |
-
"adapter/README.md": "
|
| 11 |
"adapter/RUNTIME.md": "f4d3dd69c5cfba770ccb98700ad83e94d9eb911280370e6f826ca33c710a4101",
|
| 12 |
"adapter/VALIDATION.md": "a52cc40cd37405ae00b3dbb861cf5be843f870f880b1da70c4408be05d5258d3",
|
| 13 |
"adapter/adapter-release.json": "dbe4f335021a81b6cce4cb9c7599e4d5af91cceda07c75d3e09583c0cbce6020",
|
|
|
|
| 4 |
"LICENSE": "bfa9f372762062762c414e4b5dbdf896067dd39c4a2ec5f7c3c93469dbda7852",
|
| 5 |
"LICENSE-DATA": "5e7a6e49010ac248c5467d12cfc064201a2d2d78e02004bc6e72a36f6636a5b3",
|
| 6 |
"LICENSE.adapter": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
| 7 |
+
"README.md": "41ad16b58b4a33cd1b06ea85aae741e79e12cc50c2b266820a32caffeb36c16b",
|
| 8 |
"THIRD_PARTY_NOTICES.md": "30b361cb67a2142b25db00158144c4ddd5ad5c248e2c75bd9b48e2e0fab8fa33",
|
| 9 |
"adapter/LICENSE.adapter": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
| 10 |
+
"adapter/README.md": "491d7dda546b163201bd7ee6dfce29356dc9c334aca7afb46464b10160301610",
|
| 11 |
"adapter/RUNTIME.md": "f4d3dd69c5cfba770ccb98700ad83e94d9eb911280370e6f826ca33c710a4101",
|
| 12 |
"adapter/VALIDATION.md": "a52cc40cd37405ae00b3dbb861cf5be843f870f880b1da70c4408be05d5258d3",
|
| 13 |
"adapter/adapter-release.json": "dbe4f335021a81b6cce4cb9c7599e4d5af91cceda07c75d3e09583c0cbce6020",
|