mirror of
https://github.com/yashshah9/agentbox.git
synced 2026-11-19 02:16:20 +00:00
Self-hosted agent code execution API with FastAPI, subprocess sandbox, Python SDK client, Docker Compose service, and unit tests.
19 lines
537 B
Docker
19 lines
537 B
Docker
FROM python:3.12-slim AS base
|
|
WORKDIR /app
|
|
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
|
|
|
FROM base AS dev
|
|
COPY pyproject.toml README.md ./
|
|
COPY src ./src
|
|
COPY tests ./tests
|
|
RUN pip install --no-cache-dir -e ".[dev]"
|
|
CMD ["pytest", "tests/", "-v"]
|
|
|
|
FROM base AS runtime
|
|
COPY pyproject.toml README.md ./
|
|
COPY src ./src
|
|
RUN pip install --no-cache-dir .
|
|
EXPOSE 8080
|
|
HEALTHCHECK CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health')"
|
|
CMD ["agentbox", "serve", "--host", "0.0.0.0", "--port", "8080"]
|