| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| FROM node:20-slim AS frontend-builder |
|
|
| WORKDIR /build |
|
|
| COPY frontend/package.json frontend/package-lock.json ./ |
| RUN npm ci --production=false |
|
|
| COPY frontend/ ./ |
| RUN npm run build |
|
|
| |
| FROM python:3.12-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| git curl ca-certificates \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN useradd -m -u 1000 user |
|
|
| USER user |
|
|
| ENV HOME=/home/user \ |
| PATH=/home/user/.local/bin:$PATH \ |
| PYTHONUNBUFFERED=1 \ |
| GITPILOT_PROVIDER=ollabridge \ |
| OLLABRIDGE_BASE_URL=https://ruslanmv-ollabridge.hf.space \ |
| GITPILOT_OLLABRIDGE_MODEL=qwen2.5:1.5b \ |
| CORS_ORIGINS="*" \ |
| GITPILOT_CONFIG_DIR=/tmp/gitpilot |
|
|
| WORKDIR $HOME/app |
|
|
| |
| |
| COPY --chown=user pyproject.toml README.md ./ |
|
|
| |
| RUN pip install --no-cache-dir --upgrade pip && \ |
| pip install --no-cache-dir \ |
| "fastapi>=0.111.0" \ |
| "uvicorn[standard]>=0.30.0" \ |
| "httpx>=0.27.0" \ |
| "python-dotenv>=1.1.0,<1.2.0" \ |
| "typer>=0.12.0,<0.24.0" \ |
| "pydantic>=2.7.0,<2.12.0" \ |
| "rich>=13.0.0" \ |
| "pyjwt[crypto]>=2.8.0" |
|
|
| |
| RUN pip install --no-cache-dir \ |
| "litellm" \ |
| "crewai[anthropic]>=0.76.9" \ |
| "crewai-tools>=0.13.4" \ |
| "anthropic>=0.39.0" \ |
| "ibm-watsonx-ai>=1.1.0" \ |
| "langchain-ibm>=0.3.0" |
|
|
| |
| COPY --chown=user gitpilot ./gitpilot |
|
|
| |
| COPY --chown=user --from=frontend-builder /build/dist/ ./gitpilot/web/ |
|
|
| |
| RUN pip install --no-cache-dir --no-deps -e . |
|
|
| EXPOSE 7860 |
|
|
| |
| |
| |
|
|
| |
| CMD ["python", "-m", "uvicorn", "gitpilot.api:app", \ |
| "--host", "0.0.0.0", \ |
| "--port", "7860", \ |
| "--workers", "2", \ |
| "--limit-concurrency", "10", \ |
| "--timeout-keep-alive", "120"] |
|
|