# get latest version of "idefics-80b" repo | |
git pull | |
cd .. | |
PATH_TO_REPOS=$(pwd) | |
echo ${PATH_TO_REPOS} | |
SOURCE_REPO="idefics-80b" | |
if [ ! -d $SOURCE_REPO ]; then | |
GIT_LFS_SKIP_SMUDGE=1 git clone "https://huggingface.co/HuggingFaceM4/${SOURCE_REPO}" | |
else | |
echo "Repository is already cloned." | |
fi | |
TARGET_REPOS=("idefics-9b" "idefics-9b-instruct" "idefics-80b-instruct") | |
for TARGET_REPO in "${TARGET_REPOS[@]}"; do | |
echo $TARGET_REPO | |
if [ ! -d $TARGET_REPO ]; then | |
GIT_LFS_SKIP_SMUDGE=1 git clone "https://huggingface.co/HuggingFaceM4/${TARGET_REPO}" | |
else | |
echo "Repository is already cloned." | |
fi | |
cd "$TARGET_REPO" || exit | |
# Make sure you have the latest version | |
git pull | |
# Remove the existing README | |
rm -f README.md | |
# Copy README from SOURCE_REPO | |
cp "${PATH_TO_REPOS}/${SOURCE_REPO}/README.md" "${PATH_TO_REPOS}/${TARGET_REPO}" | |
git add README.md | |
git commit -m "Update README from ${SOURCE_REPO}" | |
git push origin main | |
cd .. | |
done |