Skip to content
Merged

v0.6.7 #1318

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies = [
"rich>=13.6.0,<15.0.0",
"pydantic>=2.0.0, <3.0",
"typer>=0.9.0,<0.16",
"click<8.2.0", # TODO: Upgrade typer range and test cli before allowing >=8.2.0
"tenacity>=8.1.0,<10.0.0",
"rstr>=3.2.2,<4.0.0",
"typing-extensions>=4.8.0,<5.0.0",
Expand Down Expand Up @@ -206,4 +207,5 @@ dependencies = true # to load [tool.poetry.dependencies]
[tool.liccheck.authorized_packages]
aiocache = "0.12.3" # BSD 3-Clause
aiohappyeyeballs = "2.4.3" # Python Software Foundation
guardrails-api = "*" # Modified ELSSTIC
guardrails-api = "*" # Modified ELSSTIC
pondpond = "1.4.1" # Apache 2.0
30 changes: 30 additions & 0 deletions server_ci/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.coverage
.coverage.MacBook-Pro.local.75130.XUoRtLxx
.dockerignore
.docusaurus
.git
.github
.gitignore
.idea
.pre-commit-config.yaml
.pytest_cache
.python-version
.ruff_cache
.venv
.vscode
build
codecov.yml
CONTRIBUTING.md
docs
docs-build
docs-graveyard
DOCS.md
docusaurus
htmlcov
make.bat
mlartifacts
mlruns
node_modules
package-lock.json
package.json
tests
14 changes: 4 additions & 10 deletions server_ci/Dockerfile.fastapi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.12-slim
# New LiteLLM version has a dependency on madoka which requires g++ to build the wheel
FROM python:3.12

ARG GUARDRAILS_TOKEN
ARG GUARDRAILS_TEMPLATE="guard-template.json"
Expand All @@ -19,9 +20,6 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pipx install poetry

# Ensure poetry is available in the PATH
ENV PATH="/root/.local/bin:$PATH"

# Copy the entrypoint script
Expand All @@ -30,13 +28,9 @@ COPY ../ /app/guardrails

# Install guardrails, the guardrails API, and gunicorn
# openai optional. only used for integration testing
RUN pip install "uvicorn[standard]" "guardrails-api>=0.1.0a1" "guardrails-api-client>=0.4.0a2" --no-cache-dir

WORKDIR /app/guardrails

RUN poetry install
RUN pip install "uvicorn[standard]" --no-cache-dir

RUN pip install ./
RUN pip install "/app/guardrails[api]"

RUN guardrails configure --enable-metrics --enable-remote-inferencing --token $GUARDRAILS_TOKEN

Expand Down
9 changes: 4 additions & 5 deletions server_ci/Dockerfile.flask
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.12-slim
# New LiteLLM version has a dependency on madoka which requires g++ to build the wheel
FROM python:3.12

ARG GUARDRAILS_TOKEN
ARG GUARDRAILS_TEMPLATE="guard-template.json"
Expand All @@ -19,17 +20,15 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pipx install poetry

# Ensure poetry is available in the PATH
ENV PATH="/root/.local/bin:$PATH"

# Copy the entrypoint script
COPY /server_ci/flask-entry.sh /app/flask-entry.sh

# Install guardrails, the guardrails API, and gunicorn
# openai optional. only used for integration testing
RUN pip install "gunicorn[gthread]>=22.0.0,<23" "guardrails-api>=0.0.5,<0.1.0" "guardrails-ai==0.5.15" "guardrails-api-client>=0.3.0,<0.4.0"
# Lock click version to what's compatible with typer==0.12.5
RUN pip install "click==8.1.8" "gunicorn[gthread]>=22.0.0,<23" "guardrails-ai[api]==0.5.15"

RUN guardrails configure --enable-metrics --enable-remote-inferencing --token $GUARDRAILS_TOKEN

Expand Down