pong / QUICKSTART.md
chrisxx's picture
Add Neural Pong application files
8746765
|
raw
history blame
2.64 kB

๐Ÿš€ Quick Setup Guide for Hugging Face Space

Your Neural Pong demo is ready to deploy! Follow these steps:

Step 1: Create Your Hugging Face Space

  1. Go to Hugging Face Spaces: https://huggingface.co/spaces
  2. Click "Create new Space"
  3. Fill in the details:
    • Space name: neural-pong (or your preferred name)
    • SDK: Select "Docker" โš ๏ธ Important!
    • Hardware: Select "GPU" โ†’ "T4 small" (or larger)
    • Visibility: Public or Private
  4. Click "Create Space"

Step 2: Upload Files Using Git

cd /share/u/wendler/code/toy-wm-hf-space

# Initialize git (if not already done)
git init

# Add all files
git add .

# Commit
git commit -m "Initial commit: Neural Pong demo"

# Add your Space as remote (replace YOUR_USERNAME and SPACE_NAME)
git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME

# Push everything
git push -u origin main

Note: The checkpoint file is 225MB, so Git is recommended over web upload.

Step 3: Wait for Build

  1. After pushing, Hugging Face will automatically start building
  2. Go to your Space page โ†’ "Logs" tab to watch progress
  3. Build time: 5-15 minutes (installing PyTorch, etc.)

Step 4: Test Your Space

  1. Once build completes, visit your Space URL
  2. You should see the Pong interface
  3. Wait for model to load (loading spinner)
  4. Click "Start Stream"
  5. Use Arrow Keys or WASD to play!

Quick Commands

# Run the setup script
./setup.sh

# Check files are ready
ls -la

# Test Docker build locally (optional)
docker build -t neural-pong .
docker run -p 7860:7860 neural-pong

Troubleshooting

Build Fails?

  • Check "Logs" tab for errors
  • Verify checkpoint path in configs/inference.yaml
  • Ensure GPU is selected in Space settings

Model Won't Load?

  • Verify checkpoint exists: checkpoints/ckpt-step=053700-metric=0.00092727.pt
  • Check the path in configs/inference.yaml
  • Look for errors in the Logs tab

What's Included

โœ… app.py - Flask application (no single-user limitation) โœ… checkpoints/ - Model checkpoint (225MB) โœ… src/ - All necessary source code (15 Python files) โœ… static/index.html - Frontend interface โœ… configs/inference.yaml - Model configuration โœ… Dockerfile - Container configuration โœ… requirements.txt - Python dependencies

Need More Help?


Ready? Run ./setup.sh to get started! ๐Ÿš€