Skip to content

Commit

Permalink
feat(run): add Docker Compose files for API containers
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 21, 2023
1 parent 64663f5 commit 2a6df0f
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
File renamed without changes.
24 changes: 24 additions & 0 deletions run/cuda/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-cuda-ubuntu
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.
24 changes: 24 additions & 0 deletions run/rocm/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-rocm-ubuntu
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: {}
13 changes: 13 additions & 0 deletions run/rocm/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name: onnx-web
labels:
name: onnx-web
spec:
containers:
- name: onnx-web
image: docker.io/ssube/onnx-web-api:main-rocm-ubuntu
ports:
- containerPort: 5000
resources: {}

0 comments on commit 2a6df0f

Please sign in to comment.