adaptai / platform /aiml /experiments /create_sharded_repos.sh
ADAPT-Chase's picture
Add files using upload-large-folder tool
3e626a5 verified
#!/bin/bash
# Mass repo creation script for 500GB sharded upload
# Creates 25 dataset repositories on Hugging Face
NUM_SHARDS=25
ORG="LevelUp2x"
BASE_NAME="cc-shard"
for i in $(seq -w 1 $NUM_SHARDS); do
REPO_NAME="${BASE_NAME}-${i}"
echo "Creating repository: ${ORG}/${REPO_NAME}"
huggingface-cli repo create "${ORG}/${REPO_NAME}" --type dataset --organization "${ORG}"
if [ $? -eq 0 ]; then
echo "✅ Successfully created ${ORG}/${REPO_NAME}"
else
echo "❌ Failed to create ${ORG}/${REPO_NAME}"
echo "Retrying in 5 seconds..."
sleep 5
huggingface-cli repo create "${ORG}/${REPO_NAME}" --type dataset --organization "${ORG}"
fi
# Add small delay to avoid rate limiting
sleep 2
done
echo "All repositories created successfully!"
echo "Index repo: ${ORG}/cc"
echo "Shard repos: ${ORG}/${BASE_NAME}-01 to ${ORG}/${BASE_NAME}-${NUM_SHARDS}"