Skip to content

Commit

Permalink
fix(build): add cv2 deps to CPU image
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 21, 2023
1 parent 1ed7b22 commit 77d68bf
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/Containerfile.cpu.buster
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ FROM docker.io/python:3.10-buster

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 python3 -m venv onnx_env
Expand All @@ -18,6 +22,8 @@ RUN pip3 install -r requirements.txt --no-cache-dir

COPY onnx_web/ /onnx-web/api/onnx_web/

COPY params.json /onnx-web/api/params.json

ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"

COPY gui/ /onnx-web/gui/
Expand Down
3 changes: 3 additions & 0 deletions api/gui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bundle/main.js
config.json
index.html
24 changes: 24 additions & 0 deletions run/cpu/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -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: {}
File renamed without changes.
File renamed without changes.

0 comments on commit 77d68bf

Please sign in to comment.