From 4ff8a2ca2f63b9af42c4d190259d401abae3908d Mon Sep 17 00:00:00 2001 From: jayasankar Date: Wed, 26 Jun 2024 14:59:24 +0530 Subject: [PATCH 1/2] ai services commented --- docker/docker-compose.yml | 194 ++++++++++++++-------------- docker/nginx/default.conf | 6 +- docker/nginx/prod/app.conf.template | 6 +- 3 files changed, 103 insertions(+), 103 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 53f4972d..11a36964 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,7 +3,7 @@ services: kratos-postgresd: image: postgres:9.6 ports: - - "5432:5432" + - "5437:5432" expose: - 5432 restart: always @@ -91,7 +91,7 @@ services: - 5432 ports: # HOST:CONTAINER - - "5433:5432" + - "5436:5432" networks: - VE-network volumes: @@ -345,109 +345,109 @@ services: - VE-network - vachan-ai: - image: vachanengine/vachan-ai:0.0.0-alpha.8 - healthcheck: - timeout: 45s - interval: 10s - retries: 10 - environment: - - VACHAN_POSTGRES_HOST=${VACHAN_POSTGRES_HOST:-vachan-db} - - VACHAN_POSTGRES_USER=${VACHAN_POSTGRES_USER:-postgres} - - VACHAN_POSTGRES_PASSWORD=${VACHAN_POSTGRES_PASSWORD:-password} - - VACHAN_POSTGRES_DATABASE=${VACHAN_POSTGRES_DATABASE:-vachan_dev} - - VACHAN_POSTGRES_SCHEMA=${VACHAN_POSTGRES_SCHEMA:-aischema} - - VACHAN_POSTGRES_PORT=5432 +# vachan-ai: +# image: vachanengine/vachan-ai:0.0.0-alpha.8 +# healthcheck: +# timeout: 45s +# interval: 10s +# retries: 10 +# environment: +# - VACHAN_POSTGRES_HOST=${VACHAN_POSTGRES_HOST:-vachan-db} +# - VACHAN_POSTGRES_USER=${VACHAN_POSTGRES_USER:-postgres} +# - VACHAN_POSTGRES_PASSWORD=${VACHAN_POSTGRES_PASSWORD:-password} +# - VACHAN_POSTGRES_DATABASE=${VACHAN_POSTGRES_DATABASE:-vachan_dev} +# - VACHAN_POSTGRES_SCHEMA=${VACHAN_POSTGRES_SCHEMA:-aischema} +# - VACHAN_POSTGRES_PORT=5432 - - VACHAN_AI_XLSR_MAX_AUDIO_DURATION=${VACHAN_AI_XLSR_MAX_AUDIO_DURATION:-25} - - VACHAN_AI_XLSR_SAMPLING_RATE=${VACHAN_AI_XLSR_SAMPLING_RATE:-16000} - - VACHAN_AI_NLLB_MAX_SRC_CHARS=${VACHAN_AI_NLLB_MAX_SRC_CHARS:-512} - - VACHAN_AI_NLLB_BATCH_SIZE=${VACHAN_AI_NLLB_BATCH_SIZE:-10} +# - VACHAN_AI_XLSR_MAX_AUDIO_DURATION=${VACHAN_AI_XLSR_MAX_AUDIO_DURATION:-25} +# - VACHAN_AI_XLSR_SAMPLING_RATE=${VACHAN_AI_XLSR_SAMPLING_RATE:-16000} +# - VACHAN_AI_NLLB_MAX_SRC_CHARS=${VACHAN_AI_NLLB_MAX_SRC_CHARS:-512} +# - VACHAN_AI_NLLB_BATCH_SIZE=${VACHAN_AI_NLLB_BATCH_SIZE:-10} - - MLFLOW_TRACKING_URI=${MLFLOW_TRACKING_URI:-http://dov2prodconn.bridgeconn.com:8083} - - VACHAN_AI_ARTIFACT_PATH=${VACHAN_AI_ARTIFACT_PATH:-models} - - VACHAN_AI_SERVED_MODEL_URI=${VACHAN_AI_SERVED_MODEL_URI:-http://dov2prodconn.bridgeconn.com:8085/v2/models} - - VACHAN_AI_MODEL_SETTINGS_DIR=${VACHAN_AI_MODEL_SETTINGS_DIR:-serving_model} - - VACHAN_AI_REQUEST_TIMEOUT=${VACHAN_AI_REQUEST_TIMEOUT:-60} +# - MLFLOW_TRACKING_URI=${MLFLOW_TRACKING_URI:-http://dov2prodconn.bridgeconn.com:8083} +# - VACHAN_AI_ARTIFACT_PATH=${VACHAN_AI_ARTIFACT_PATH:-models} +# - VACHAN_AI_SERVED_MODEL_URI=${VACHAN_AI_SERVED_MODEL_URI:-http://dov2prodconn.bridgeconn.com:8085/v2/models} +# - VACHAN_AI_MODEL_SETTINGS_DIR=${VACHAN_AI_MODEL_SETTINGS_DIR:-serving_model} +# - VACHAN_AI_REQUEST_TIMEOUT=${VACHAN_AI_REQUEST_TIMEOUT:-60} - - VACHAN_AI_AWS_ACCESS_KEY=${VACHAN_AI_AWS_ACCESS_KEY} - - VACHAN_AI_AWS_SECRET_ACCESS_KEY=${VACHAN_AI_AWS_SECRET_ACCESS_KEY} - - VACHAN_AI_S3_BUCKET=${VACHAN_AI_S3_BUCKET} - - VACHAN_AI_AWS_ACCOUNT_REGION=${VACHAN_AI_AWS_ACCOUNT_REGION} +# - VACHAN_AI_AWS_ACCESS_KEY=${VACHAN_AI_AWS_ACCESS_KEY} +# - VACHAN_AI_AWS_SECRET_ACCESS_KEY=${VACHAN_AI_AWS_SECRET_ACCESS_KEY} +# - VACHAN_AI_S3_BUCKET=${VACHAN_AI_S3_BUCKET} +# - VACHAN_AI_AWS_ACCOUNT_REGION=${VACHAN_AI_AWS_ACCOUNT_REGION} - - VACHAN_AI_DATA_PATH=${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data} - - VACHAN_AI_LOGGING_LEVEL=INFO - - VACHAN_LOGGING_LEVEL=INFO - - VACHAN_AI_ENV=${VACHAN_AI_ENV:-Production} - - VACHAN_AI_MLSERVER_REQUEST_TIMEOUT=120 - - PYTHONPATH=/app/app/core/model_access/ai_model_core.py:/app/app/core/cloud_operations - - VACHAN_REDIS_PASS=${VACHAN_REDIS_PASS:-vsfrgetd} - - VACHAN_AI_DELETION_PERIOD=${VACHAN_AI_DELETION_PERIOD:-14} - - VACHAN_AI_CRON_DAY=${VACHAN_AI_CRON_DAY:-MON} - - VACHAN_AI_CRON_HOUR=${VACHAN_AI_CRON_HOUR:-12} - - VACHAN_AI_CRON_MINUTE=${VACHAN_AI_CRON_MINUTE:-30} - - VACHAN_AI_BASEPATH=/v2/ai - - VACHAN_DOMAIN=${VACHAN_DOMAIN:-http://localhost} - - VACHAN_AI_DOMAIN=http://vachan-api - command: uvicorn main:app --host 0.0.0.0 --port 8009 - volumes: - - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/docker-volumes/ai-logs-vol:/app/logs - - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/cache:/root/.cache - - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/Downloads:/tmp - - ${VACHAN_AI_DATA_PATH}/Downloads:${VACHAN_AI_DATA_PATH}/Downloads - restart: always - depends_on: - - vachan-api - - redis - profiles: - - local-run - - deployment - expose: - - 8009 - ports: - - "8009:8009" - networks: - - VE-network - container_name: vachan-ai +# - VACHAN_AI_DATA_PATH=${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data} +# - VACHAN_AI_LOGGING_LEVEL=INFO +# - VACHAN_LOGGING_LEVEL=INFO +# - VACHAN_AI_ENV=${VACHAN_AI_ENV:-Production} +# - VACHAN_AI_MLSERVER_REQUEST_TIMEOUT=120 +# - PYTHONPATH=/app/app/core/model_access/ai_model_core.py:/app/app/core/cloud_operations +# - VACHAN_REDIS_PASS=${VACHAN_REDIS_PASS:-vsfrgetd} +# - VACHAN_AI_DELETION_PERIOD=${VACHAN_AI_DELETION_PERIOD:-14} +# - VACHAN_AI_CRON_DAY=${VACHAN_AI_CRON_DAY:-MON} +# - VACHAN_AI_CRON_HOUR=${VACHAN_AI_CRON_HOUR:-12} +# - VACHAN_AI_CRON_MINUTE=${VACHAN_AI_CRON_MINUTE:-30} +# - VACHAN_AI_BASEPATH=/v2/ai +# - VACHAN_DOMAIN=${VACHAN_DOMAIN:-http://localhost} +# - VACHAN_AI_DOMAIN=http://vachan-api +# command: uvicorn main:app --host 0.0.0.0 --port 8009 +# volumes: +# - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/docker-volumes/ai-logs-vol:/app/logs +# - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/cache:/root/.cache +# - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/Downloads:/tmp +# - ${VACHAN_AI_DATA_PATH}/Downloads:${VACHAN_AI_DATA_PATH}/Downloads +# restart: always +# depends_on: +# - vachan-api +# - redis +# profiles: +# - local-run +# - deployment +# expose: +# - 8009 +# ports: +# - "8009:8009" +# networks: +# - VE-network +# container_name: vachan-ai - worker: - image: vachanengine/vachan-ai:0.0.0-alpha.8 - healthcheck: - timeout: 45s - interval: 10s - retries: 10 - environment: - - REDIS_HOST=redis - - REDIS_PORT=6379 - - VACHAN_POSTGRES_HOST=${VACHAN_POSTGRES_HOST:-vachan-db} - - VACHAN_POSTGRES_USER=${VACHAN_POSTGRES_USER:-postgres} - - VACHAN_POSTGRES_PASSWORD=${VACHAN_POSTGRES_PASSWORD:-password} - - VACHAN_POSTGRES_DATABASE=${VACHAN_POSTGRES_DATABASE:-vachan_dev} - - VACHAN_POSTGRES_SCHEMA=${VACHAN_POSTGRES_SCHEMA:-aischema} - - VACHAN_POSTGRES_PORT=5432 - - VACHAN_AI_DATA_PATH=${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data} - - VACHAN_AI_SERVED_MODEL_URI=${VACHAN_AI_SERVED_MODEL_URI:-http://dov2prodconn.bridgeconn.com:8085/v2/models} - - VACHAN_AI_MLSERVER_REQUEST_TIMEOUT=120 - - PYTHONPATH=/app/app/core/model_access/ai_model_core.py:/app/app/core/cloud_operations - command: rq worker --url redis://:${VACHAN_REDIS_PASS}@redis:6379 - links: - - redis - depends_on: - - redis - - vachan-api - volumes: - - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/docker-volumes/redis_worker-logs-vol:/app/rqlogs - - ../data/csvs:/csvs - - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/Downloads:/tmp - profiles: - - local-run - - deployment - networks: - - VE-network - container_name: redis-worker +# worker: +# image: vachanengine/vachan-ai:0.0.0-alpha.8 +# healthcheck: +# timeout: 45s +# interval: 10s +# retries: 10 +# environment: +# - REDIS_HOST=redis +# - REDIS_PORT=6379 +# - VACHAN_POSTGRES_HOST=${VACHAN_POSTGRES_HOST:-vachan-db} +# - VACHAN_POSTGRES_USER=${VACHAN_POSTGRES_USER:-postgres} +# - VACHAN_POSTGRES_PASSWORD=${VACHAN_POSTGRES_PASSWORD:-password} +# - VACHAN_POSTGRES_DATABASE=${VACHAN_POSTGRES_DATABASE:-vachan_dev} +# - VACHAN_POSTGRES_SCHEMA=${VACHAN_POSTGRES_SCHEMA:-aischema} +# - VACHAN_POSTGRES_PORT=5432 +# - VACHAN_AI_DATA_PATH=${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data} +# - VACHAN_AI_SERVED_MODEL_URI=${VACHAN_AI_SERVED_MODEL_URI:-http://dov2prodconn.bridgeconn.com:8085/v2/models} +# - VACHAN_AI_MLSERVER_REQUEST_TIMEOUT=120 +# - PYTHONPATH=/app/app/core/model_access/ai_model_core.py:/app/app/core/cloud_operations +# command: rq worker --url redis://:${VACHAN_REDIS_PASS}@redis:6379 +# links: +# - redis +# depends_on: +# - redis +# - vachan-api +# volumes: +# - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/docker-volumes/redis_worker-logs-vol:/app/rqlogs +# - ../data/csvs:/csvs +# - ${VACHAN_AI_DATA_PATH:-/home/gitautodeploy/vachan_ai_data}/Downloads:/tmp +# profiles: +# - local-run +# - deployment +# networks: +# - VE-network +# container_name: redis-worker # Web Server diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 4a4b8013..6adb1ba7 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -19,9 +19,9 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - location /v2/ai/ { - proxy_pass http://vachan-ai:8009; - } +# location /v2/ai/ { +# proxy_pass http://vachan-ai:8009; +# } location /v2/auth/ { proxy_pass http://vachan-access:8007; diff --git a/docker/nginx/prod/app.conf.template b/docker/nginx/prod/app.conf.template index 279b64a1..dca605e2 100644 --- a/docker/nginx/prod/app.conf.template +++ b/docker/nginx/prod/app.conf.template @@ -37,9 +37,9 @@ server { ssl_certificate_key /etc/nginx/ssl/live/${VACHAN_DOMAIN}/privkey.pem; - location /v2/ai/ { - proxy_pass http://vachan-ai:8009; - } +# location /v2/ai/ { +# proxy_pass http://vachan-ai:8009; +# } location /v2/auth/ { proxy_pass http://vachan-access:8007; From 5c06531c42264f49b334a9f8c9b6757141e02196 Mon Sep 17 00:00:00 2001 From: jayasankar Date: Wed, 26 Jun 2024 15:05:09 +0530 Subject: [PATCH 2/2] ports corrected --- docker/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 11a36964..880dbb23 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,7 +3,7 @@ services: kratos-postgresd: image: postgres:9.6 ports: - - "5437:5432" + - "5432:5432" expose: - 5432 restart: always @@ -91,7 +91,7 @@ services: - 5432 ports: # HOST:CONTAINER - - "5436:5432" + - "5433:5432" networks: - VE-network volumes: