Spaces:
Sleeping
Sleeping
Validation Scripts
Pre-submission validation scripts for OpenEnv environments.
Quick Start
Linux / macOS (Bash)
# Make executable
chmod +x scripts/validate-submission.sh
# Run with your HF Space URL
./scripts/validate-submission.sh https://your-space.hf.space
# Or specify a repo directory
./scripts/validate-submission.sh https://your-space.hf.space ./path/to/repo
Windows (PowerShell)
# Allow script execution (run once)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Run with your HF Space URL
.\scripts\validate-submission.ps1 -PingUrl https://your-space.hf.space
# Or specify a repo directory
.\scripts\validate-submission.ps1 -PingUrl https://your-space.hf.space -RepoDir ./path/to/repo
What Gets Validated
The validation scripts check three critical aspects:
- HF Space Connectivity — Verifies your Space is live and responds to
/resetendpoint - Docker Build — Ensures your Dockerfile builds successfully (600s timeout)
- openenv validate — Confirms environment structure is correct for deployment
Requirements
- Docker: Get Docker
- openenv-core:
pip install openenv-core - curl: Usually pre-installed on modern systems
Usage Examples
Validate current directory (recommended)
./scripts/validate-submission.sh https://my-team.hf.space
Validate from anywhere, specify repo path
./scripts/validate-submission.sh https://my-team.hf.space ./my-env-repo
Run from remote (Linux/macOS only)
curl -fsSL https://raw.githubusercontent.com/<owner>/<repo>/main/scripts/validate-submission.sh | bash -s -- https://my-team.hf.space
Exit Codes
- 0: All checks passed, submission ready
- 1: One or more checks failed (see output for details)
Troubleshooting
"HF Space not reachable"
- Verify your Space URL is correct
- Check that your Space is running (not paused)
- Verify network connectivity
"Docker build failed"
- Check Docker is installed and running
- Review Dockerfile for syntax errors
- Ensure all dependencies are pinned with exact versions
"openenv validate failed"
- Verify
openenv.yamlexists in repo root - Check
server/app.pyhas propermain()function andif __name__ == '__main__'guard - Ensure all required files are present
Notes
- Docker builds have a 600s timeout to prevent hanging
- HF Space connectivity timeout is 30s
- Consider running this script before final submission to catch issues early