datamatters24 commited on
Commit
afc76d2
·
verified ·
1 Parent(s): fd393b4

Scriptwriter dataset sync

Browse files
Files changed (3) hide show
  1. go.sh +8 -16
  2. runpod-bootstrap.sh +8 -16
  3. scriptwriter-runpod-ready.tgz +2 -2
go.sh CHANGED
@@ -1,8 +1,5 @@
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}"
@@ -10,28 +7,23 @@ 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
 
 
1
  #!/bin/bash
2
+ # curl -fsSL "https://huggingface.co/datasets/datamatters24/scriptwriter-runpod/resolve/main/go.sh" | bash
 
 
 
3
  set -euo pipefail
4
 
5
  REPO="${RUNPOD_BUNDLE_REPO:-datamatters24/scriptwriter-runpod}"
 
7
  DEST="${WORKDIR:-/workspace/scriptwriter-runpod}"
8
  TGZ="/tmp/scriptwriter-runpod-ready.tgz"
9
 
 
 
 
 
 
10
  echo "=== Downloading RunPod bundle from ${REPO} ==="
11
  mkdir -p "$(dirname "$DEST")"
12
+ # Public repo no auth needed for the bundle. HF_TOKEN still used later for private dataset/model.
13
+ curl -fsSL "${BASE}/scriptwriter-runpod-ready.tgz" -o "${TGZ}"
 
14
 
15
  rm -rf "${DEST}"
16
  mkdir -p "${DEST}"
17
+ # RunPod containers cannot chown to uid 1000 — ignore ownership from the tarball
18
+ tar xzf "${TGZ}" -C "${DEST}" --strip-components=1 --no-same-owner --no-same-permissions
19
 
20
  if [[ ! -f "${DEST}/run.sh" ]]; then
 
21
  if [[ -f "${DEST}/runpod-ready/run.sh" ]]; then
22
  DEST="${DEST}/runpod-ready"
23
  else
24
+ echo "ERROR: run.sh not found after extract"
25
+ find "${DEST}" | head -40
26
+ exit 1
27
  fi
28
  fi
29
 
runpod-bootstrap.sh CHANGED
@@ -1,8 +1,5 @@
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}"
@@ -10,28 +7,23 @@ 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
 
 
1
  #!/bin/bash
2
+ # curl -fsSL "https://huggingface.co/datasets/datamatters24/scriptwriter-runpod/resolve/main/go.sh" | bash
 
 
 
3
  set -euo pipefail
4
 
5
  REPO="${RUNPOD_BUNDLE_REPO:-datamatters24/scriptwriter-runpod}"
 
7
  DEST="${WORKDIR:-/workspace/scriptwriter-runpod}"
8
  TGZ="/tmp/scriptwriter-runpod-ready.tgz"
9
 
 
 
 
 
 
10
  echo "=== Downloading RunPod bundle from ${REPO} ==="
11
  mkdir -p "$(dirname "$DEST")"
12
+ # Public repo no auth needed for the bundle. HF_TOKEN still used later for private dataset/model.
13
+ curl -fsSL "${BASE}/scriptwriter-runpod-ready.tgz" -o "${TGZ}"
 
14
 
15
  rm -rf "${DEST}"
16
  mkdir -p "${DEST}"
17
+ # RunPod containers cannot chown to uid 1000 — ignore ownership from the tarball
18
+ tar xzf "${TGZ}" -C "${DEST}" --strip-components=1 --no-same-owner --no-same-permissions
19
 
20
  if [[ ! -f "${DEST}/run.sh" ]]; then
 
21
  if [[ -f "${DEST}/runpod-ready/run.sh" ]]; then
22
  DEST="${DEST}/runpod-ready"
23
  else
24
+ echo "ERROR: run.sh not found after extract"
25
+ find "${DEST}" | head -40
26
+ exit 1
27
  fi
28
  fi
29
 
scriptwriter-runpod-ready.tgz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:23780bf461c3358253e87f86d23be19bce240f3ca6d1d284335768879ba1047d
3
- size 6751
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:792a59c153af5626dd8ec13ba665c24a28ea8beb0160050572d6ddbbd7da6119
3
+ size 6868