Skip to content

Commit

Permalink
Merge pull request #31 from whylabs/compose-update
Browse files Browse the repository at this point in the history
Update docker compose default values
  • Loading branch information
naddeoa authored Jun 19, 2024
2 parents 487d5ba + 0ed680d commit 038fe8e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
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

0 comments on commit 038fe8e

Please sign in to comment.