# Check if Git LFS is installed | |
if ! command -v git-lfs &> /dev/null | |
then | |
echo "Git LFS is not installed. Installing..." | |
brew install git-lfs | |
git lfs install | |
fi | |
# Check if the repository already exists | |
if [ -d "nvidia-gpu-dataset" ]; then | |
echo "Removing existing nvidia-gpu-dataset directory..." | |
rm -rf nvidia-gpu-dataset | |
fi | |
# Clone the Hugging Face dataset repository | |
git clone https://huggingface.co/datasets/bniladridas/nvidia-gpu-dataset | |
# Check if the clone was successful | |
if [ ! -d "nvidia-gpu-dataset" ]; then | |
echo "Failed to clone the repository." | |
exit 1 | |
fi | |
# Copy dataset files into the cloned repository | |
cp -r /Users/niladridas/Desktop/nvidia_doc/* nvidia-gpu-dataset/ | |
# Change directory to the cloned repository | |
cd nvidia-gpu-dataset/ | |
# Log in to Hugging Face | |
huggingface-cli login | |
# Add files to git | |
git add . | |
# Commit the changes | |
git commit -m "Add NVIDIA GPU dataset files" | |
# Push the changes to Hugging Face | |
git push | |