CoolFace
Apppublic

Pruthvi1762/cloud-devops-openenv

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
README.md88 linesDownload Raw Back to root
1---2title: Cloud Devops Openenv3emoji: 🔧4colorFrom: blue5colorTo: indigo6sdk: docker7app_port: 78608pinned: false9license: mit10---11 12# Cloud Systems Incident Responder - OpenEnv Environment13 14A real-world OpenEnv environment where an AI agent acts as a Junior DevOps Engineer to diagnose and resolve system incidents in a simulated cloud server.15 16## Overview17 18The environment simulates a Linux-like server with a filesystem, process list, and service logs. The agent interacts with the environment through a CLI-style action space to fix common infrastructure failures.19 20## Action Space21 22The agent can issue text commands:23- `ls <path>`: List directory contents.24- `cat <file>`: Read file content.25- `write <file> <content>`: Create or update a file.26- `ps`: List running processes.27- `kill <pid>`: Stop a process by its ID.28- `done`: Signal task completion.29 30## Observation Space31 32The environment returns a JSON observation containing:33- `filesystem`: A mapping of file paths to their current contents.34- `processes`: A list of active system processes and their status.35- `logs`: Recent system logs indicating errors or status changes.36- `task_description`: A clear objective for the current task.37- `step_count`, `max_steps`: Progress tracking.38 39## Tasks & Grading40 41### 1. Port Mismatch (Easy)42- **Goal**: Fix a configuration error where Nginx is proxying to port 8000 instead of 8080.43- **Grader**: Checks if `/etc/nginx/nginx.conf` contains the correct `proxy_pass`.44- **Reward**: 1.0 upon resolution.45 46### 2. Missing Credentials (Medium)47- **Goal**: Find database credentials in `/root/secrets.txt` and update `/app/.env`.48- **Grader**: Checks if `.env` has the correct `DB_URL`.49- **Reward**: 0.5 for identification, 0.5 for correction.50 51### 3. Resource Leak (Hard)52- **Goal**: Identify and kill a memory-leaking process (`memory_hog`) and increase memory limits in `/etc/system/limits.yaml`.53- **Grader**: Checks if the process is gone and the limit is set to `512MB`.54- **Reward**: 0.4 for kill, 0.6 for config update.55 56## Setup & Execution57 58### local Setup591. Install dependencies:60   ```bash61   pip install -r requirements.txt62   ```632. Start the server:64   ```bash65   python app.py66   ```67 68### Execution69Run the baseline agent:70```bash71export API_BASE_URL="your-endpoint"72export MODEL_NAME="your-model"73export HF_TOKEN="your-token"74python inference.py75```76 77### Validation78Run the pre-submission validator:79```bash80python validate_env.py81```82 83## Compliance84- **Typed Models**: Defined in `models.py` using Pydantic.85- **OpenEnv Spec**: Full implementation of `reset`, `step`, and `state`.86- **Logging**: Strict adherence to `[START]`, `[STEP]`, and `[END]` formats.87- **Deployment**: `Dockerfile` ready for Hugging Face Spaces on port 7860.88