Skip to content

Commit

Permalink
fix: postgres host
Browse files Browse the repository at this point in the history
  • Loading branch information
Phelan164 authored and pinglin committed Feb 12, 2022
1 parent 4978e6c commit a322165
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CFG_HTTP_PORT=8080

CFG_DATABASE_USERNAME=postgres
CFG_DATABASE_PASSWORD=password
CFG_DATABASE_HOST=localhost
CFG_DATABASE_PORT=5432
CFG_DATABASE_VERSION=1

CFG_TRITONSERVER_GRPCURI=triton-server:8001
CFG_TRITONSERVER_MODELSTORE=/models
63 changes: 63 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: '3'

services:
database:
image: postgres:14.1-alpine
container_name: pg_sql
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
timeout: 20s
retries: 10
migrate:
container_name: model-backend-migrate
build:
context: .
dockerfile: ./Dockerfile
depends_on:
database:
condition: service_healthy
restart: on-failure
env_file: .env
environment:
CFG_DATABASE_HOST: database
entrypoint: ./migrate

model-backend:
container_name: model-backend
build:
context: .
dockerfile: ./Dockerfile
depends_on:
triton-server:
condition: service_healthy
env_file: .env
environment:
CFG_DATABASE_HOST: database
restart: on-failure
ports:
- 8080:8080
volumes:
- models:/models

triton-server:
# image: europe-west2-docker.pkg.dev/prj-c-devops-artifacts-a306/triton/triton-server:1.4.0
image: nvcr.io/nvidia/tritonserver:21.09-py3
command: tritonserver --model-store=/models --model-control-mode=explicit --allow-http=true --strict-model-config=false --log-verbose=1
volumes:
- models:/models
- ./conda-pack:/conda-pack
ports:
- 8001:8001
healthcheck:
test: ["CMD-SHELL", "curl localhost:8000/v2/health/ready"]
timeout: 20s
retries: 10
# modelmesh:
# image: model-mesh:v0.7.0
volumes:
dbdata:
models:

0 comments on commit a322165

Please sign in to comment.