pong / setup.sh
chrisxx's picture
Add Neural Pong application files
8746765
raw
history blame
1.53 kB
#!/bin/bash
# Quick setup script for Hugging Face Space deployment
set -e
echo "๐Ÿš€ Neural Pong - Hugging Face Space Setup"
echo "=========================================="
echo ""
# Check if we're in the right directory
if [ ! -f "app.py" ] || [ ! -f "Dockerfile" ]; then
echo "โŒ Error: Please run this script from the toy-wm-hf-space directory"
exit 1
fi
# Check if checkpoint exists
if [ ! -f "checkpoints/ckpt-step=053700-metric=0.00092727.pt" ]; then
echo "โŒ Error: Checkpoint file not found!"
echo " Expected: checkpoints/ckpt-step=053700-metric=0.00092727.pt"
exit 1
fi
echo "โœ… Checkpoint file found"
echo "โœ… All required files present"
echo ""
# Check if git is initialized
if [ ! -d ".git" ]; then
echo "๐Ÿ“ฆ Initializing git repository..."
git init
echo "โœ… Git initialized"
else
echo "โœ… Git repository already initialized"
fi
echo ""
echo "๐Ÿ“‹ Next steps:"
echo ""
echo "1. Create a Hugging Face Space:"
echo " - Go to https://huggingface.co/spaces"
echo " - Click 'Create new Space'"
echo " - Name: neural-pong (or your choice)"
echo " - SDK: Docker"
echo " - Hardware: GPU (T4 small or larger)"
echo ""
echo "2. Add the remote and push:"
echo " git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME"
echo " git add ."
echo " git commit -m 'Initial commit'"
echo " git push -u origin main"
echo ""
echo "3. Wait for build (5-15 minutes)"
echo ""
echo "๐Ÿ“– For detailed instructions, see SETUP_GUIDE.md"
echo ""