forked from SamsungSAILMontreal/TinyRecursiveModels
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontainer-onstart.sh
More file actions
34 lines (29 loc) · 1.68 KB
/
container-onstart.sh
File metadata and controls
34 lines (29 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
bash -lc '
set -euo pipefail
# ── 0 · Env toggles ──────────────────────────────────────────────────────────
export HF_HUB_ENABLE_HF_TRANSFER="${HF_HUB_ENABLE_HF_TRANSFER:-1}"
export PIP_ROOT_USER_ACTION=ignore
export WANDB_API_KEY="${WANDB_API_KEY:-}"
export HUGGING_FACE_HUB_TOKEN="${HUGGING_FACE_HUB_TOKEN:-}"
# ── 1 · System packages ─────────────────────────────────────────────────────
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git nano ninja-build build-essential python3-dev python3-venv \
libnuma1 libnuma-dev pkg-config curl ca-certificates
# ── 2 · Git identity (optional) ─────────────────────────────────────────────
[ -n "${GIT_USER_NAME:-}" ] && git config --global user.name "$GIT_USER_NAME"
[ -n "${GIT_USER_EMAIL:-}" ] && git config --global user.email "$GIT_USER_EMAIL"
# ── 3 · Repo ────────────────────────────────────────────────────────────────
cd /workspace
if [ -d TinyRecursiveModels/.git ]; then
git -C TinyRecursiveModels pull --ff-only
else
if [ -n "${GITHUB_PAT:-}" ]; then
git clone "https://${GITHUB_PAT}@github.com/TrelisResearch/TinyRecursiveModels.git"
else
git clone https://github.com/TrelisResearch/TinyRecursiveModels.git
fi
fi
cd TinyRecursiveModels
bash init.sh
'