fix(build): add cv2 deps to CPU image
This commit is contained in:
parent
1ed7b221c4
commit
77d68bf6ac
|
@ -2,6 +2,10 @@ FROM docker.io/python:3.10-buster
|
||||||
|
|
||||||
WORKDIR /onnx-web/api
|
WORKDIR /onnx-web/api
|
||||||
|
|
||||||
|
RUN apt-get -y update \
|
||||||
|
&& apt-get install -y ffmpeg libsm6 libxext6 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip3 install virtualenv --upgrade
|
RUN pip3 install virtualenv --upgrade
|
||||||
|
|
||||||
RUN python3 -m venv onnx_env
|
RUN python3 -m venv onnx_env
|
||||||
|
@ -18,6 +22,8 @@ RUN pip3 install -r requirements.txt --no-cache-dir
|
||||||
|
|
||||||
COPY onnx_web/ /onnx-web/api/onnx_web/
|
COPY onnx_web/ /onnx-web/api/onnx_web/
|
||||||
|
|
||||||
|
COPY params.json /onnx-web/api/params.json
|
||||||
|
|
||||||
ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"
|
ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"
|
||||||
|
|
||||||
COPY gui/ /onnx-web/gui/
|
COPY gui/ /onnx-web/gui/
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
bundle/main.js
|
||||||
|
config.json
|
||||||
|
index.html
|
|
@ -0,0 +1,24 @@
|
||||||
|
services:
|
||||||
|
onnx-web-api:
|
||||||
|
image: docker.io/ssube/onnx-web-api:main-cpu-buster
|
||||||
|
command: sh -c "python -m onnx_web.convert --diffusion --upscaling --correction && flask --app=onnx_web.serve run --host=0.0.0.0"
|
||||||
|
environment:
|
||||||
|
- ONNX_WEB_MODEL_PATH=/data/models
|
||||||
|
- ONNX_WEB_OUTPUT_PATH=/data/outputs
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
volumes:
|
||||||
|
- type: volume
|
||||||
|
source: onnx-web-models
|
||||||
|
target: /data/models
|
||||||
|
volume:
|
||||||
|
nocopy: true
|
||||||
|
- type: volume
|
||||||
|
source: onnx-web-outputs
|
||||||
|
target: /data/outputs
|
||||||
|
volume:
|
||||||
|
nocopy: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
onnx-web-models: {}
|
||||||
|
onnx-web-outputs: {}
|
Loading…
Reference in New Issue