Upload /app/agent-zero-fleet/agent-zero-pentesting/orchestrator.py with huggingface_hub
Browse files
app/agent-zero-fleet/agent-zero-pentesting/orchestrator.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
| 3 |
+
ENV PYTHONUNBUFFERED=1
|
| 4 |
+
ENV PYTHONIOENCODING=utf-8
|
| 5 |
+
ENV AGENT_NAME="pentesting"
|
| 6 |
+
ENV AGENT_ROLE="pentesting_engineer"
|
| 7 |
+
ENV WORKSPACE_ROOT="/workspace"
|
| 8 |
+
ENV PROJECTS_DIR="/workspace/projects"
|
| 9 |
+
ENV SHARED_DIR="/workspace/shared"
|
| 10 |
+
ENV CONFIG_DIR="/workspace/config"
|
| 11 |
+
ENV LOGS_DIR="/workspace/logs"
|
| 12 |
+
ENV TASK_QUEUE="/workspace/shared/task_queue"
|
| 13 |
+
ENV COMPLETED_DIR="/workspace/shared/completed"
|
| 14 |
+
ENV LITELLM_PROXY_HOST="0.0.0.0"
|
| 15 |
+
ENV LITELLM_PROXY_PORT="8000"
|
| 16 |
+
ENV OPENAI_API_BASE="http://localhost:8000/v1"
|
| 17 |
+
ENV OPENAI_API_KEY="not-needed"
|
| 18 |
+
ENV MODEL_NAME="huggingface/Qwen/Qwen2.5-72B-Instruct"
|
| 19 |
+
ENV FALLBACK_MODELS="huggingface/meta-llama/Llama-3.1-70B-Instruct,huggingface/mistralai/Mixtral-8x22B-Instruct-v0.1"
|
| 20 |
+
ENV HF_INFERENCE_API="https://api-inference.huggingface.co/models/"
|
| 21 |
+
ENV HF_TOKEN="${HF_TOKEN}"
|
| 22 |
+
ENV PERSISTENCE_ENABLED="true"
|
| 23 |
+
ENV DATA_VOLUME="/data"
|
| 24 |
+
ENV SQLITE_DB="/data/agent_memory.db"
|
| 25 |
+
RUN apt-get update && apt-get install -y \
|
| 26 |
+
git curl wget jq sqlite3 \
|
| 27 |
+
build-essential libssl-dev \
|
| 28 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 29 |
+
RUN pip install --no-cache-dir \
|
| 30 |
+
gradio==4.44.0 \
|
| 31 |
+
litellm==1.48.0 \
|
| 32 |
+
openai==1.54.0 \
|
| 33 |
+
httpx==0.27.2 \
|
| 34 |
+
sqlite-vec==0.1.6 \
|
| 35 |
+
sentence-transformers==3.2.0 \
|
| 36 |
+
schedule==1.2.2 \
|
| 37 |
+
psutil==6.1.0 \
|
| 38 |
+
pyyaml==6.0.2 \
|
| 39 |
+
requests==2.32.3 \
|
| 40 |
+
huggingface-hub==0.26.2
|
| 41 |
+
RUN mkdir -p ${WORKSPACE_ROOT}/{projects,shared/task_queue,shared/completed,config,logs,data}
|
| 42 |
+
RUN mkdir -p ${DATA_VOLUME}
|
| 43 |
+
COPY . /app/
|
| 44 |
+
WORKDIR /app
|
| 45 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
| 46 |
+
CMD curl -f http://localhost:7860/health || exit 1
|
| 47 |
+
EXPOSE 7860 8000
|
| 48 |
+
CMD ["python", "orchestrator.py"]
|