Scriptwriter dataset sync
Browse files- ONELINE.txt +1 -0
- ONELINE_HFCLI.txt +1 -0
- go.sh +41 -0
ONELINE.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
export HF_TOKEN=TOKEN; curl -fsSL -H "Authorization: Bearer $HF_TOKEN" -o /tmp/r.sh "https://huggingface.co/datasets/datamatters24/scriptwriter-runpod/resolve/main/go.sh"; bash /tmp/r.sh
|
ONELINE_HFCLI.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
export HF_TOKEN=TOKEN; pip install -q huggingface_hub && huggingface-cli download datamatters24/scriptwriter-runpod go.sh --repo-type dataset --local-dir /tmp/sw && bash /tmp/sw/go.sh
|
go.sh
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Run on RunPod (after export HF_TOKEN=...):
|
| 3 |
+
# curl -fsSL -H "Authorization: Bearer $HF_TOKEN" \
|
| 4 |
+
# "https://huggingface.co/datasets/datamatters24/scriptwriter-runpod/resolve/main/runpod-bootstrap.sh" \
|
| 5 |
+
# | bash
|
| 6 |
+
set -euo pipefail
|
| 7 |
+
|
| 8 |
+
REPO="${RUNPOD_BUNDLE_REPO:-datamatters24/scriptwriter-runpod}"
|
| 9 |
+
BASE="https://huggingface.co/datasets/${REPO}/resolve/main"
|
| 10 |
+
DEST="${WORKDIR:-/workspace/scriptwriter-runpod}"
|
| 11 |
+
TGZ="/tmp/scriptwriter-runpod-ready.tgz"
|
| 12 |
+
|
| 13 |
+
if [[ -z "${HF_TOKEN:-}" ]]; then
|
| 14 |
+
echo "Set HF_TOKEN first: export HF_TOKEN=hf_..."
|
| 15 |
+
exit 1
|
| 16 |
+
fi
|
| 17 |
+
|
| 18 |
+
echo "=== Downloading RunPod bundle from ${REPO} ==="
|
| 19 |
+
mkdir -p "$(dirname "$DEST")"
|
| 20 |
+
curl -fsSL -H "Authorization: Bearer ${HF_TOKEN}" \
|
| 21 |
+
"${BASE}/scriptwriter-runpod-ready.tgz" \
|
| 22 |
+
-o "${TGZ}"
|
| 23 |
+
|
| 24 |
+
rm -rf "${DEST}"
|
| 25 |
+
mkdir -p "${DEST}"
|
| 26 |
+
tar xzf "${TGZ}" -C "${DEST}" --strip-components=1
|
| 27 |
+
# tarball contains top-level runpod-ready/ ; strip so DEST has run.sh
|
| 28 |
+
|
| 29 |
+
if [[ ! -f "${DEST}/run.sh" ]]; then
|
| 30 |
+
# fallback if strip didn't apply (flat extract)
|
| 31 |
+
if [[ -f "${DEST}/runpod-ready/run.sh" ]]; then
|
| 32 |
+
DEST="${DEST}/runpod-ready"
|
| 33 |
+
else
|
| 34 |
+
echo "ERROR: run.sh not found after extract"; find "${DEST}" | head -40; exit 1
|
| 35 |
+
fi
|
| 36 |
+
fi
|
| 37 |
+
|
| 38 |
+
echo "=== Bundle ready at ${DEST} ==="
|
| 39 |
+
cd "${DEST}"
|
| 40 |
+
export WORKDIR="${DEST}"
|
| 41 |
+
bash "${DEST}/run.sh"
|