-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Common infrastructure for torchserve containers, wrap entrypoint.
- Loading branch information
Showing
16 changed files
with
110 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
FROM ubuntu:22.04 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
WORKDIR /root | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
python3-pip | ||
RUN pip config set global.no-cache-dir false && \ | ||
git clone https://github.com/pytorch/serve -b v0.8.2 && \ | ||
cd serve && \ | ||
python3 ./ts_scripts/install_dependencies.py --environment prod && \ | ||
pip3 install . && \ | ||
pip3 install -r examples/object_detector/yolo/yolov8/requirements.txt && \ | ||
cd .. && \ | ||
rm -rf serve | ||
COPY torchserve/install-torchserve.sh /torchserve/install-torchserve.sh | ||
RUN /torchserve/install-torchserve.sh | ||
RUN /usr/local/bin/torchserve --help | ||
COPY torchserve/config.properties /torchserve/config.properties | ||
COPY torchserve/torchserve-entrypoint.sh /torchserve/torchserve-entrypoint.sh | ||
CMD ["/torchserve/torchserve-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: "3.3" | ||
networks: | ||
gamutrf: | ||
services: | ||
torchserve: | ||
restart: always | ||
image: iqtlabs/gamutrf-cuda-torchserve:latest | ||
networks: | ||
- gamutrf | ||
ports: | ||
- '8080:8080' | ||
volumes: | ||
- '${VOL_PREFIX}:/model_store' | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: 1 | ||
capabilities: [gpu] | ||
command: | ||
- --models mini2_snr=mini2_snr.mar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "3.3" | ||
networks: | ||
gamutrf: | ||
services: | ||
torchserve: | ||
restart: always | ||
image: iqtlabs/gamutrf-torchserve:latest | ||
networks: | ||
- gamutrf | ||
ports: | ||
- '8080:8080' | ||
volumes: | ||
- '${VOL_PREFIX}:/model_store' | ||
command: | ||
- --models mini2_snr=mini2_snr.mar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
inference_address=http://0.0.0.0:8080 | ||
management_address=http://0.0.0.0:8081 | ||
metrics_address=http://0.0.0.0:8082 | ||
# batch_size=16 | ||
# max_batch_delay=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
python3-pip | ||
pip config set global.no-cache-dir false && \ | ||
git clone https://github.com/pytorch/serve -b v0.9.0 && \ | ||
cd serve && \ | ||
python3 ./ts_scripts/install_dependencies.py --environment prod $* && \ | ||
pip3 install . && \ | ||
pip3 install -r examples/object_detector/yolo/yolov8/requirements.txt && \ | ||
cd .. && \ | ||
rm -rf serve | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
exec /usr/local/bin/torchserve --start --model-store /model_store --ts-config /torchserve/config.properties --ncs --foreground $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters