{"id":31541285,"url":"https://github.com/bitnom/kagglebox","last_synced_at":"2025-10-04T10:58:26.702Z","repository":{"id":295914456,"uuid":"991301537","full_name":"bitnom/KaggleBox","owner":"bitnom","description":"Secure SSH access to Kaggle notebook environments via ngrok tunneling","archived":false,"fork":false,"pushed_at":"2025-05-28T02:03:06.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-28T02:55:16.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitnom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-27T12:27:07.000Z","updated_at":"2025-05-28T02:03:09.000Z","dependencies_parsed_at":"2025-05-28T02:55:18.760Z","dependency_job_id":"a8e1c5d6-d412-494c-9864-98003a63a657","html_url":"https://github.com/bitnom/KaggleBox","commit_stats":null,"previous_names":["bitnom/kagglebox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitnom/KaggleBox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitnom%2FKaggleBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitnom%2FKaggleBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitnom%2FKaggleBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitnom%2FKaggleBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitnom","download_url":"https://codeload.github.com/bitnom/KaggleBox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitnom%2FKaggleBox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278302543,"owners_count":25964521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-04T10:58:24.398Z","updated_at":"2025-10-04T10:58:26.689Z","avatar_url":"https://github.com/bitnom.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KaggleBox 📦\n\nA Jupyter notebook that creates secure SSH access to Kaggle notebook environments via ngrok tunneling. Connect to your Kaggle notebooks from your local terminal with full sudo privileges.\n\nKaggle provides (for free) a generous VM server of 4 CPU cores, 32GB RAM, and the ability to attach 2x T4 GPUs, a P100, or a TPU. This notebook allows you to use that VM as a GPU dev server via SSH. Ollama is included.\n\n## Content Creators / Sharing Notice\n\nPlease do not share this repo on X, YouTube, etc. This repo is intended for Discord warriors. Share it on your Discord server, np.\n\n## Features\n\n- 🔐 **Secure SSH Access**: Dedicated user with SSH key authentication\n- 🛡️ **Passwordless Sudo**: Full administrative privileges\n- 🌐 **Ngrok Integration**: SSH and Ollama tunnels via ngrok\n- 🤖 **Ollama Integration**: Pre-configured Ollama server with model pulling\n- 🔧 **Gollama Tool**: Golang-based Ollama management utility\n- 💾 **Persistent Storage**: Automatic backup and restore of your development environment\n- 🔄 **Auto-Backup**: Background rsync daemon with extensive smart exclusions\n\n## Quick Start\n\n**Note:** GPU \u0026 TPU accelerators are disabled by default. You must manually enable it for this Kaggle notebook if/when you want to attach one.\n\n1. **Upload to Kaggle**: Upload `kagglebox.ipynb` to your Kaggle notebook environment\n\n2. **Set Ngrok Token**: Add your ngrok authtoken to Kaggle Secrets with the key `ngrok`\n\n3. **Configure Settings** (Optional): Edit configuration variables in the first cell:\n   - `BACKUP_KAGGLEBOX`: Enable/disable automatic backup (default: True)\n   - `RESTORE_KAGGLEBOX`: Restore from previous backup (default: False)  \n   - `DEBUG`: Enable debug output (default: False)\n   - `OLLAMA`: Install and run Ollama server (default: True)\n   - `OLLAMA_MODEL`: Ollama model to pull and use (default: \"deepseek-r1:8b\"). See: [https://ollama.com/library](https://ollama.com/library)\n   - `CONNECT_NGROK`: Enable ngrok tunneling (default: True)\n\n4. **Run All Cells**: Execute the notebook to set up SSH access, Ollama, and backups\n   - The notebook automatically cleans up any existing ngrok processes\n   - Installs dependencies including Golang and Gollama\n   - Sets up comprehensive backup exclusions\n\n5. **Connect**: Copy and paste the generated SSH command into your local terminal\n\n## What It Does\n\n- Creates a `kagglebox` user with passwordless sudo access\n- Generates SSH keys and configures secure authentication\n- Installs and starts OpenSSH server\n- Installs Golang and Gollama (Ollama management tool)\n- Sets up Ollama server with specified model\n- Creates ngrok tunnels for SSH and Ollama access\n- Runs background backup daemon with extensive smart exclusions for cache/temp directories\n- Provides ready-to-use connection commands\n\n## Example Output\n\n```\n!!!!!!!!    IMPORTANT NOTES    !!!!!!!!\n1. RUN THE BELOW CODE IN YOUR LOCAL TERMINAL\n2. Press Ctrl+C here to stop ngrok when you're done\n\n!!!!!!!!    SSH COMMAND    !!!!!!!!\n(\necho -----BEGIN OPENSSH PRIVATE KEY-----\necho [key content...]\necho -----END OPENSSH PRIVATE KEY-----\n) \u003e ~/.ssh/rsa_kagglebox \u0026\u0026 chmod 600 ~/.ssh/rsa_kagglebox\nssh -i ~/.ssh/rsa_kagglebox kagglebox@8.tcp.us-cal-1.ngrok.io -p 17913 -o ServerAliveInterval=60\n\nOllama URL: https://abc123.ngrok.io\n```\n\n## Requirements\n\n- Kaggle notebook environment\n- Ngrok account and authtoken  \n- Local machine with SSH client\n\n## Troubleshooting\n\n- **Connection issues**: Verify ngrok token is correct and tunnel is active\n- **Permission denied**: Check SSH key was created with proper permissions (600)\n- **Backup issues**: Check `/kaggle/working/kagglebox-rsync.log` for errors\n- **Ollama issues**: Check if model is properly downloaded and Ollama service is running\n- **Clean restart**: Set `BACKUP_KAGGLEBOX = False` to disable backups if needed\n- **Debug mode**: Set `DEBUG = True` to see detailed output during setup\n\n## Use Cases\n\n- **Remote Development**: Use VS Code, IntelliJ, etc. with Kaggle's powerful hardware\n- **Persistent Environment**: Your setup persists across notebook sessions with comprehensive backup\n- **AI Development**: Use Ollama for local LLM development and testing with Gollama management\n- **Package Installation**: Install software with sudo access\n- **Long-term Projects**: Work on projects spanning multiple sessions\n\n## Backup System\n\nThe automatic backup system uses rsync with extensive exclusions to avoid backing up temporary and cache files.\n\n## TODO\n\n- **Cache Ollama models to backup/working mount**: Store downloaded models in persistent storage to avoid re-downloading across sessions\n- **Fully flesh out backup \u0026 restore**: Enhance backup system with incremental backups, compression, and selective restore options\n- **Integrate code-server/web-based VSCode**: Add web-based VS Code interface accessible through ngrok tunnel\n- **Implement Kaggle official models feature**: Integrate access to Kaggle's official pre-trained models\n- **Implement Kaggle official datasets feature**: Add functionality to easily access and mount Kaggle datasets\n\n## License\n\nApache License 2.0 - feel free to modify and distribute.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitnom%2Fkagglebox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitnom%2Fkagglebox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitnom%2Fkagglebox/lists"}