Skip to content

Commit

Permalink
feat(build): run convert script when container starts
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 21, 2023
1 parent 45a3ddc commit a8769a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/Containerfile.cpu.buster
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"

COPY gui/ /onnx-web/gui/

CMD [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
CMD [ "sh", "-c", "python -m onnx_web.convert --diffusion --upscaling --correction --extras && flask --app=onnx_web.serve run --host=0.0.0.0" ]
2 changes: 1 addition & 1 deletion api/Containerfile.cuda.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"

COPY gui/ /onnx-web/gui/

CMD [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
CMD [ "sh", "-c", "python -m onnx_web.convert --diffusion --upscaling --correction --extras && flask --app=onnx_web.serve run --host=0.0.0.0" ]
2 changes: 1 addition & 1 deletion api/Containerfile.directml.buster
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"

COPY gui/ /onnx-web/gui/

CMD [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
CMD [ "sh", "-c", "python -m onnx_web.convert --diffusion --upscaling --correction --extras && flask --app=onnx_web.serve run --host=0.0.0.0" ]
2 changes: 1 addition & 1 deletion api/Containerfile.rocm.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ ENV ONNX_WEB_BUNDLE_PATH="/onnx-web/gui"

COPY gui/ /onnx-web/gui/

CMD [ "flask", "--app=onnx_web.serve", "run", "--host=0.0.0.0" ]
CMD [ "sh", "-c", "python -m onnx_web.convert --diffusion --upscaling --correction --extras && flask --app=onnx_web.serve run --host=0.0.0.0" ]

0 comments on commit a8769a5

Please sign in to comment.