File size: 1,529 Bytes
8746765 |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#!/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 ""
|