diff --git a/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py b/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py index 27fd2a5..795f78c 100755 --- a/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py +++ b/cope2n-ai-fi/api/sdsap_sbt/prediction_sbt.py @@ -32,6 +32,7 @@ kvu_cfg['ocr_configs'] = ocr_cfg option = kvu_cfg['option'] kvu_cfg.pop("option") # pop option sbt_engine = load_engine(kvu_cfg) +kvu_cfg["option"] = option def sbt_predict(image_url, engine) -> None: diff --git a/cope2n-ai-fi/weights b/cope2n-ai-fi/weights deleted file mode 120000 index c9ea64b..0000000 --- a/cope2n-ai-fi/weights +++ /dev/null @@ -1 +0,0 @@ -/mnt/hdd4T/vietanhdev/SBT-IDP/cope2n-ai-fi/weights/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 03ea0bd..037c53f 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ + # TODO: use docker-compose extend: for compact purpose version: '3.0' networks: @@ -70,13 +71,13 @@ services: - ctel-sbt volumes: - ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT} - - BE_static:/app/static + - ./data/BE_static:/app/static - ./cope2n-api:/app working_dir: /app depends_on: db-sbt: condition: service_started - command: sh -c "sleep 5; python manage.py collectstatic --no-input && + command: sh -c "chmod -R 777 /app/static; sleep 5; python manage.py collectstatic --no-input && python manage.py migrate && python manage.py compilemessages && gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod @@ -114,8 +115,6 @@ services: image: redis:6.2-alpine restart: always command: redis-server --save 20 1 --loglevel warning - volumes: - - ./data/redis:/data networks: - ctel-sbt @@ -134,7 +133,7 @@ services: - DB_HOST=${DB_HOST} - DB_PORT=${DB_PUBLIC_PORT} - BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-sbt:5672 - - BASE_UI_URL=http://fe:${VITE_PORT} + - BASE_UI_URL=http://fe:${VITE_PORT} - DEBUG=${DEBUG} - DB_INTERNAL_KEY=${DB_INTERNAL_KEY} - IMAGE_TOKEN_LIFE_TIME=${IMAGE_TOKEN_LIFE_TIME} @@ -181,10 +180,6 @@ services: mem_reservation: 600m restart: always image: rabbitmq:3.10-alpine - # ports: - # - 5672:5672 - volumes: - - rabbitmq_data:/var/lib/rabbitmq working_dir: /workspace/cope2n-api networks: - ctel-sbt @@ -202,7 +197,7 @@ services: shm_size: 10gb privileged: true ports: - - 9889:80 + - 80:80 depends_on: be-ctel-sbt: condition: service_started @@ -212,12 +207,9 @@ services: - VITE_PROXY=http://be-ctel-sbt:${BASE_PORT} - VITE_API_BASE_URL=http://fe-sbt:80 volumes: - - BE_static:/backend-static + - ./data/BE_static:/backend-static networks: - ctel-sbt volumes: db_data: - rabbitmq_data: - sqlite_data: - BE_static: