修改docker-compose

This commit is contained in:
zhouchengrong
2024-04-03 15:34:19 +08:00
parent 4f97e840b9
commit cc46fb6453
2 changed files with 3 additions and 3 deletions

View File

@@ -60,6 +60,7 @@ LOGS_PATH = "app/logs/errors.log"
# LOGS_PATH = "logs/errors.log"
SR_MODEL_NAME = "super_resolution"
SR_TRITON_URL = "10.1.1.240:10031"
# rabbitmq config

View File

@@ -16,7 +16,7 @@ import tritonclient.grpc as grpcclient
from PIL import Image
from minio import Minio
from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT, REDIS_HOST, REDIS_PORT, REDIS_DB, SR_MODEL_NAME, RABBITMQ_PARAMS, RABBITMQ_QUEUES
from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT, REDIS_HOST, REDIS_PORT, REDIS_DB, SR_MODEL_NAME, RABBITMQ_PARAMS, RABBITMQ_QUEUES, SR_TRITON_URL
from app.schemas.super_resolution import SuperResolutionModel
from app.service.utils.decorator import RunTime
@@ -27,8 +27,7 @@ logger = logging.getLogger()
class SuperResolution:
def __init__(self, data):
self.triton_client = httpclient.InferenceServerClient(url=f"10.1.1.150:7000")
self.triton_client = grpcclient.InferenceServerClient(url=f"10.1.1.150:7001")
self.triton_client = grpcclient.InferenceServerClient(url=SR_TRITON_URL)
self.redis_client = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB, decode_responses=True)
self.tasks_id = data.sr_tasks_id
self.sr_image_url = data.sr_image_url