调试docker-compose启动

This commit is contained in:
2024-09-25 16:29:56 +08:00
parent 101b2126f4
commit 186cab0317
3 changed files with 17 additions and 17 deletions

View File

@@ -111,18 +111,18 @@ services:
# capabilities: [ 'gpu' ] # capabilities: [ 'gpu' ]
# driver: 'nvidia' # driver: 'nvidia'
api_test: # api_test:
<<: *project_template # <<: *project_template
build: # build:
context: . # context: .
container_name: api_test # container_name: api_test
hostname: api_test # hostname: api_test
depends_on: # depends_on:
- ocr_api # - ocr_api
# - settlement_api ## - settlement_api
# - discharge_api ## - discharge_api
# - cost_api ## - cost_api
# - clas_api ## - clas_api
# - det_api ## - det_api
# - dewarp_api ## - dewarp_api
command: [ 'api_test.py' ] # command: [ 'api_test.py' ]

View File

@@ -12,7 +12,7 @@ ENV PYTHONUNBUFFERED=1 \
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
# 安装依赖 # 安装依赖
COPY requestments.txt /app/requirements.txt COPY requirements.txt /app/requirements.txt
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone \
&& pip install --no-cache-dir -r requirements.txt \ && pip install --no-cache-dir -r requirements.txt \
&& pip uninstall -y onnxruntime onnxruntime-gpu \ && pip uninstall -y onnxruntime onnxruntime-gpu \
@@ -25,4 +25,4 @@ COPY . /app
# EXPOSE 8081 # EXPOSE 8081
# 运行api接口具体接口在命令行或docker-compose.yml文件中定义 # 运行api接口具体接口在命令行或docker-compose.yml文件中定义
#ENTRYPOINT ["gunicorn"] ENTRYPOINT ["gunicorn"]