eopod


Nameeopod JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/erfanzar/EOpod
SummaryEOpod is a streamlined command execution tool designed to run and manage operations on Google Cloud Pods efficiently
upload_time2025-01-19 01:31:08
maintainerNone
docs_urlNone
authorErfan Zare Chavoshi
requires_python<3.14,>=3.10
licenseApache-2.0
keywords eopod
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EOpod: Enhanced TPU Command Runner

EOpod is a command-line tool designed to simplify and enhance interaction with Google Cloud TPU VMs. It provides real-time output streaming, background process management, and robust error handling.

## Features

* **Configuration Management:** Easily configure EOpod with your Google Cloud project ID, zone, and TPU name.
* **Command Execution:** Run commands on TPU VMs with advanced features like retries, delays, timeouts, and worker selection.
* **Interactive Mode (Experimental):** Run commands in an interactive SSH session (use with caution).
* **Command History:** View a history of executed commands, their status, and truncated output.
* **Error Logging:** Detailed error logs are maintained for debugging failed commands.
* **Rich Output:** Utilizes the `rich` library for visually appealing and informative output in the console.

## Installation

```bash
pip install eopod
```

## Configuration

Before using EOpod, configure it with your Google Cloud credentials:

```bash
eopod configure --project-id YOUR_PROJECT_ID --zone YOUR_ZONE --tpu-name YOUR_TPU_NAME
```

## Usage Examples

### Basic Command Execution

Commands are executed with real-time output streaming by default:

```bash
# Simple command
eopod run echo "Hello TPU"

# Run Python script
eopod run python train.py --batch-size 32

# Complex commands with pipes and redirections
eopod run "cat data.txt | grep error > errors.log"

# Commands with multiple arguments
eopod run ls -la /path/to/dir
```

### Background Processes

Run long-running tasks in the background:

```bash
# Start training in background
eopod run python long_training.py --epochs 1000 --background

# Check background processes
eopod check-background

# Check specific process
eopod check-background 12345

# Kill a background process
eopod kill 12345

# Force kill if necessary
eopod kill 12345 --force
```

### Worker-Specific Commands

Execute commands on specific workers:

```bash
# Run on specific worker
eopod run nvidia-smi --worker 0

# Run on all workers (default)
eopod run hostname --worker all
```

### Advanced Options

```bash
# Disable output streaming
eopod run python script.py --no-stream

# Set custom retry count
eopod run python train.py --retry 5

# Set custom retry delay
eopod run python train.py --delay 10

# Set custom timeout
eopod run python train.py --timeout 600
```

### Kill and free TPU process

```bash
# Kill all TPU processes
eopod kill-tpu

# Force kill all TPU processes
eopod kill-tpu --force

# Kill specific PID(s)
eopod kill-tpu --pid 1234 --pid 5678

# Kill processes on specific worker
eopod kill-tpu --worker 0
```

### Viewing History and Logs

```bash
# View command history
eopod history

# View error logs
eopod errors

# View current configuration
eopod show-config
```

## Command Reference

### Main Commands

* `run`: Execute commands on TPU VM

  ```bash
  eopod run [OPTIONS] COMMAND [ARGS]...
  ```

  Options:
  * `--worker TEXT`: Specific worker or "all" (default: "all")
  * `--retry INTEGER`: Number of retries for failed commands (default: 3)
  * `--delay INTEGER`: Delay between retries in seconds (default: 5)
  * `--timeout INTEGER`: Command timeout in seconds (default: 300)
  * `--no-stream`: Disable output streaming
  * `--background`: Run command in background

* `configure`: Set up EOpod configuration

  ```bash
  eopod configure --project-id ID --zone ZONE --tpu-name NAME
  ```

* `status`: Check TPU status

  ```bash
  eopod status
  ```

* `check-background`: Check background processes

  ```bash
  eopod check-background [PID]
  ```

* `kill`: Kill background processes

  ```bash
  eopod kill PID [--force]
  ```

### Utility Commands

* `history`: View command execution history
* `errors`: View error logs
* `show-config`: Display current configuration

## File Locations

* Configuration: `~/.eopod/config.ini`
* Command history: `~/.eopod/history.yaml`
* Error logs: `~/.eopod/error_log.yaml`
* Application logs: `~/.eopod/eopod.log`

## Error Handling

EOpod includes built-in error handling and retry mechanisms:

* Automatic retry for failed commands
* Timeout handling
* Detailed error logging
* Rich error output

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/erfanzar/EOpod",
    "name": "eopod",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.10",
    "maintainer_email": null,
    "keywords": "EOpod",
    "author": "Erfan Zare Chavoshi",
    "author_email": "Erfanzare810@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5f/ac/78f1d7cec43ac523cdd729d3c55b17ec166d2df2a7152d7de0bc686cf78d/eopod-0.0.8.tar.gz",
    "platform": null,
    "description": "# EOpod: Enhanced TPU Command Runner\n\nEOpod is a command-line tool designed to simplify and enhance interaction with Google Cloud TPU VMs. It provides real-time output streaming, background process management, and robust error handling.\n\n## Features\n\n* **Configuration Management:** Easily configure EOpod with your Google Cloud project ID, zone, and TPU name.\n* **Command Execution:** Run commands on TPU VMs with advanced features like retries, delays, timeouts, and worker selection.\n* **Interactive Mode (Experimental):** Run commands in an interactive SSH session (use with caution).\n* **Command History:** View a history of executed commands, their status, and truncated output.\n* **Error Logging:** Detailed error logs are maintained for debugging failed commands.\n* **Rich Output:** Utilizes the `rich` library for visually appealing and informative output in the console.\n\n## Installation\n\n```bash\npip install eopod\n```\n\n## Configuration\n\nBefore using EOpod, configure it with your Google Cloud credentials:\n\n```bash\neopod configure --project-id YOUR_PROJECT_ID --zone YOUR_ZONE --tpu-name YOUR_TPU_NAME\n```\n\n## Usage Examples\n\n### Basic Command Execution\n\nCommands are executed with real-time output streaming by default:\n\n```bash\n# Simple command\neopod run echo \"Hello TPU\"\n\n# Run Python script\neopod run python train.py --batch-size 32\n\n# Complex commands with pipes and redirections\neopod run \"cat data.txt | grep error > errors.log\"\n\n# Commands with multiple arguments\neopod run ls -la /path/to/dir\n```\n\n### Background Processes\n\nRun long-running tasks in the background:\n\n```bash\n# Start training in background\neopod run python long_training.py --epochs 1000 --background\n\n# Check background processes\neopod check-background\n\n# Check specific process\neopod check-background 12345\n\n# Kill a background process\neopod kill 12345\n\n# Force kill if necessary\neopod kill 12345 --force\n```\n\n### Worker-Specific Commands\n\nExecute commands on specific workers:\n\n```bash\n# Run on specific worker\neopod run nvidia-smi --worker 0\n\n# Run on all workers (default)\neopod run hostname --worker all\n```\n\n### Advanced Options\n\n```bash\n# Disable output streaming\neopod run python script.py --no-stream\n\n# Set custom retry count\neopod run python train.py --retry 5\n\n# Set custom retry delay\neopod run python train.py --delay 10\n\n# Set custom timeout\neopod run python train.py --timeout 600\n```\n\n### Kill and free TPU process\n\n```bash\n# Kill all TPU processes\neopod kill-tpu\n\n# Force kill all TPU processes\neopod kill-tpu --force\n\n# Kill specific PID(s)\neopod kill-tpu --pid 1234 --pid 5678\n\n# Kill processes on specific worker\neopod kill-tpu --worker 0\n```\n\n### Viewing History and Logs\n\n```bash\n# View command history\neopod history\n\n# View error logs\neopod errors\n\n# View current configuration\neopod show-config\n```\n\n## Command Reference\n\n### Main Commands\n\n* `run`: Execute commands on TPU VM\n\n  ```bash\n  eopod run [OPTIONS] COMMAND [ARGS]...\n  ```\n\n  Options:\n  * `--worker TEXT`: Specific worker or \"all\" (default: \"all\")\n  * `--retry INTEGER`: Number of retries for failed commands (default: 3)\n  * `--delay INTEGER`: Delay between retries in seconds (default: 5)\n  * `--timeout INTEGER`: Command timeout in seconds (default: 300)\n  * `--no-stream`: Disable output streaming\n  * `--background`: Run command in background\n\n* `configure`: Set up EOpod configuration\n\n  ```bash\n  eopod configure --project-id ID --zone ZONE --tpu-name NAME\n  ```\n\n* `status`: Check TPU status\n\n  ```bash\n  eopod status\n  ```\n\n* `check-background`: Check background processes\n\n  ```bash\n  eopod check-background [PID]\n  ```\n\n* `kill`: Kill background processes\n\n  ```bash\n  eopod kill PID [--force]\n  ```\n\n### Utility Commands\n\n* `history`: View command execution history\n* `errors`: View error logs\n* `show-config`: Display current configuration\n\n## File Locations\n\n* Configuration: `~/.eopod/config.ini`\n* Command history: `~/.eopod/history.yaml`\n* Error logs: `~/.eopod/error_log.yaml`\n* Application logs: `~/.eopod/eopod.log`\n\n## Error Handling\n\nEOpod includes built-in error handling and retry mechanisms:\n\n* Automatic retry for failed commands\n* Timeout handling\n* Detailed error logging\n* Rich error output\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "EOpod is a streamlined command execution tool designed to run and manage operations on Google Cloud Pods efficiently",
    "version": "0.0.8",
    "project_urls": {
        "Documentation": "https://eopod.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/erfanzar/EOpod",
        "Repository": "https://github.com/erfanzar/EOpod"
    },
    "split_keywords": [
        "eopod"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbe18b585835f01e2b5414f582b17bdffd28426e3a2ccc9f6736c85222470566",
                "md5": "bd2099c3a0d317bb7e4d1974e34b25aa",
                "sha256": "7017fdbb391dc77e541950d2d26e9d5a7e24b29ca118bb9c65c8c6a14ed64b4b"
            },
            "downloads": -1,
            "filename": "eopod-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bd2099c3a0d317bb7e4d1974e34b25aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.10",
            "size": 14915,
            "upload_time": "2025-01-19T01:31:07",
            "upload_time_iso_8601": "2025-01-19T01:31:07.478662Z",
            "url": "https://files.pythonhosted.org/packages/fb/e1/8b585835f01e2b5414f582b17bdffd28426e3a2ccc9f6736c85222470566/eopod-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fac78f1d7cec43ac523cdd729d3c55b17ec166d2df2a7152d7de0bc686cf78d",
                "md5": "dab23a8bd3e8b7047cf23f3a321b42b2",
                "sha256": "dca965ce18220662ff91f5318b7e9012df92e1bcea6c8794705bb13169d4feb0"
            },
            "downloads": -1,
            "filename": "eopod-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "dab23a8bd3e8b7047cf23f3a321b42b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.10",
            "size": 14855,
            "upload_time": "2025-01-19T01:31:08",
            "upload_time_iso_8601": "2025-01-19T01:31:08.785441Z",
            "url": "https://files.pythonhosted.org/packages/5f/ac/78f1d7cec43ac523cdd729d3c55b17ec166d2df2a7152d7de0bc686cf78d/eopod-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-19 01:31:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "erfanzar",
    "github_project": "EOpod",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "eopod"
}
        
Elapsed time: 3.39408s