Merge pull request #15 from dx-tan/fix/deployment-issues

Fix build issues
This commit is contained in:
Đỗ Xuân Tân 2023-12-14 14:24:09 +07:00 committed by GitHub Enterprise
commit 9d2bc19269
9 changed files with 9 additions and 33 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
.git
weights/

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
*.pth *.pth
*.zip *.zip
weights/ weights/
sdsvkie
minio_data/ minio_data/
test_images/ test_images/
*.pem *.pem

View File

@ -3,9 +3,6 @@ __pycache__
DataBase/image_temp/ DataBase/image_temp/
DataBase/json_temp/ DataBase/json_temp/
DataBase/template.db DataBase/template.db
# sdsvtd/
# sdsvtr/
# sdsvkie/
detectron2/ detectron2/
output/ output/
data/ data/

View File

@ -13,17 +13,17 @@ RUN apt-get update && apt-get install -y gcc g++ ffmpeg libsm6 libxext6 poppler-
WORKDIR /workspace WORKDIR /workspace
COPY ./modules/ocr_engine/externals/ /workspace/cope2n-ai-fi/modules/ocr_engine/externals/ # COPY ./modules/ocr_engine/externals/ /workspace/cope2n-ai-fi/modules/ocr_engine/externals/
COPY ./modules/ocr_engine/requirements.txt /workspace/cope2n-ai-fi/modules/ocr_engine/requirements.txt # COPY ./modules/ocr_engine/requirements.txt /workspace/cope2n-ai-fi/modules/ocr_engine/requirements.txt
COPY ./modules/sdsvkie/ /workspace/cope2n-ai-fi/modules/sdsvkie/ # COPY ./modules/sdsvkvu/ /workspace/cope2n-ai-fi/modules/sdsvkvu/
COPY ./modules/sdsvkvu/ /workspace/cope2n-ai-fi/modules/sdsvkvu/ # COPY ./requirements.txt /workspace/cope2n-ai-fi/requirements.txt
COPY ./requirements.txt /workspace/cope2n-ai-fi/requirements.txt
COPY . /workspace/cope2n-ai-fi
RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsv_dewarp && pip3 install -v -e . RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsv_dewarp && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsvtd && pip3 install -v -e . RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsvtd && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsvtr && pip3 install -v -e . RUN cd /workspace/cope2n-ai-fi/modules/ocr_engine/externals/sdsvtr && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi/modules/sdsvkie && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi/modules/sdsvkvu && pip3 install -v -e . RUN cd /workspace/cope2n-ai-fi/modules/sdsvkvu && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi && pip3 install -r requirements.txt RUN cd /workspace/cope2n-ai-fi && pip3 install -r requirements.txt

View File

@ -5,13 +5,11 @@ RUN apt-get update && apt-get install -y gcc g++ ffmpeg libsm6 libxext6
WORKDIR /workspace WORKDIR /workspace
COPY ./requirements.txt /workspace/cope2n-ai-fi/requirements.txt COPY ./requirements.txt /workspace/cope2n-ai-fi/requirements.txt
COPY ./sdsvkie/ /workspace/cope2n-ai-fi/sdsvkie/
COPY ./sdsvtd /workspace/cope2n-ai-fi/sdsvtd/ COPY ./sdsvtd /workspace/cope2n-ai-fi/sdsvtd/
COPY ./sdsvtr/ /workspace/cope2n-ai-fi/sdsvtr/ COPY ./sdsvtr/ /workspace/cope2n-ai-fi/sdsvtr/
COPY ./models/ /models COPY ./models/ /models
RUN cd /workspace/cope2n-ai-fi && pip3 install -r requirements.txt RUN cd /workspace/cope2n-ai-fi && pip3 install -r requirements.txt
RUN cd /workspace/cope2n-ai-fi/sdsvkie && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi/sdsvtd && pip3 install -v -e . RUN cd /workspace/cope2n-ai-fi/sdsvtd && pip3 install -v -e .
RUN cd /workspace/cope2n-ai-fi/sdsvtr && pip3 install -v -e . RUN cd /workspace/cope2n-ai-fi/sdsvtr && pip3 install -v -e .

View File

@ -3,7 +3,6 @@ django-environ
sdsv_dewarp sdsv_dewarp
sdsvtd sdsvtd
sdsvtr sdsvtr
sdsvkie
sdsvkvu sdsvkvu
pymupdf pymupdf

View File

@ -1,9 +1,2 @@
#!/bin/bash #!/bin/bash
# cd /cope2n-ai-fi/sdsvkie
# pip3 install -v -e .
# cd /cope2n-ai-fi/sdsvtd
# pip3 install -v -e .
# cd /cope2n-ai-fi/sdsvtr
# pip3 install -v -e .
# cd /cope2n-ai-fi
bash -c "celery -A celery_worker.worker_fi worker --loglevel=INFO --pool=solo" bash -c "celery -A celery_worker.worker_fi worker --loglevel=INFO --pool=solo"

View File

@ -11,9 +11,7 @@ services:
shm_size: 10gb shm_size: 10gb
dockerfile: Dockerfile dockerfile: Dockerfile
shm_size: 10gb shm_size: 10gb
# mem_limit: 8g
restart: always restart: always
# container_name: "sidp-cope2n-ai-fi-sbt"
networks: networks:
- ctel-sbt - ctel-sbt
privileged: true privileged: true
@ -40,9 +38,6 @@ services:
build: build:
context: cope2n-api context: cope2n-api
dockerfile: Dockerfile dockerfile: Dockerfile
# ports:
# - 9880:9000
# container_name: "sidp-cope2n-be-ctel-sbt"
environment: environment:
- MEDIA_ROOT=${MEDIA_ROOT} - MEDIA_ROOT=${MEDIA_ROOT}
- DB_ENGINE=${DB_ENGINE} - DB_ENGINE=${DB_ENGINE}
@ -89,9 +84,6 @@ services:
gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:9000" # pre-makemigrations on prod
minio: minio:
image: minio/minio image: minio/minio
ports:
- 9886:9884
- 9887:9885
environment: environment:
- MINIO_ROOT_USER=${S3_ACCESS_KEY} - MINIO_ROOT_USER=${S3_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${S3_SECRET_KEY} - MINIO_ROOT_PASSWORD=${S3_SECRET_KEY}
@ -129,12 +121,6 @@ services:
- ctel-sbt - ctel-sbt
be-celery-sbt: be-celery-sbt:
# build:
# context: cope2n-api
# dockerfile: Dockerfile
# args:
# - "UID=${UID:-1000}"
# - "GID=${GID:-1000}"
build: build:
context: cope2n-api context: cope2n-api
dockerfile: Dockerfile dockerfile: Dockerfile

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB