Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker compose default values #31

Merged
merged 1 commit into from
Jun 19, 2024
Merged
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
8 changes: 6 additions & 2 deletions docs/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ file and related configuration files.

Set the necessary environment variables before starting the application:

- `CONTAINER_PASSWORD`: Password used internally by containers. Set this in your
environment or directly in the Docker Compose file.
- `CONTAINER_PASSWORD`: Password used internally by containers. Set this in your environment or directly in the Docker Compose file.
- `WHYLABS_API_KEY`: API key for WhyLabs integration.
- `AUTO_PULL_WHYLABS_POLICY_MODEL_IDS`: A csv value of the model ids that you want automatically sync the WhyLabs platform metric policy
from.

Example:

```bash
export CONTAINER_PASSWORD=yourpassword
export WHYLABS_API_KEY=yourapikey

# Optional
export AUTO_PULL_WHYLABS_POLICY_MODEL_IDS=model-1
```

### Logging into GitLab Container Registry
Expand Down
24 changes: 14 additions & 10 deletions docs/compose/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: guardrails
services:

guardrails:
cap_drop:
- ALL
environment:
# A csv value of the model ids that you want automatically sync the WhyLabs platform metric policy from
# example: model-1,model-2
AUTO_PULL_WHYLABS_POLICY_MODEL_IDS: null
# A static password that has to be sent with each request to the container
CONTAINER_PASSWORD: null
# A whylabs api key generated in the WhyLabs platform
WHYLABS_API_KEY: null
image: registry.gitlab.com/whylabs/langkit-container:1.0.14
image: registry.gitlab.com/whylabs/langkit-container:1.0.22
platform: linux/amd64
ports:
- target: 8000
Expand All @@ -20,16 +24,16 @@ services:
source: temp-dir
target: /tmp
deploy:
replicas: 3
replicas: 1
restart_policy:
condition: on-failure
resources:
limits:
cpus: '4.0'
memory: 6144M
cpus: "4.0"
memory: 4500M
reservations:
cpus: '4.0'
memory: 6144M
cpus: "4.0"
memory: 3700M

nginx:
image: nginx:latest
Expand All @@ -38,16 +42,16 @@ services:
depends_on:
- guardrails
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./nginx.conf:/etc/nginx/nginx.conf
- type: tmpfs
target: /etc/nginx/conf.d
deploy:
resources:
limits:
cpus: '1.0'
cpus: "1.0"
memory: 1024M
reservations:
cpus: '1.0'
cpus: "1.0"
memory: 1024M

volumes:
Expand Down
Loading