Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
allegroai committed Mar 21, 2022
2 parents c0c163f + 69f0d91 commit 0f809ef
Show file tree
Hide file tree
Showing 68 changed files with 4,879 additions and 3,156 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
dist/
build/
*.egg-info/
.tmp/


# Compiled Python bytecode
Expand All @@ -23,6 +24,12 @@ Thumbs.db
*.app
*.exe
*.war
*.pkl
*.pt
*.pb
data/
runs/
variables/

# Large media files
*.mp4
Expand Down
365 changes: 275 additions & 90 deletions README.md

Large diffs are not rendered by default.

656 changes: 520 additions & 136 deletions clearml_serving/__main__.py

Large diffs are not rendered by default.

Empty file.
22 changes: 22 additions & 0 deletions clearml_serving/engines/triton/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

FROM nvcr.io/nvidia/tritonserver:22.02-py3


ENV LC_ALL=C.UTF-8

# install base package
RUN pip3 install clearml-serving

# get latest execution code from the git repository
# RUN cd $HOME && git clone https://github.com/allegroai/clearml-serving.git
COPY clearml_serving /root/clearml/clearml_serving

RUN pip3 install -r /root/clearml/clearml_serving/engines/triton/requirements.txt

# default serving port
EXPOSE 8001

# environement variable to load Task from CLEARML_SERVING_TASK_ID, CLEARML_SERVING_PORT

WORKDIR /root/clearml/
ENTRYPOINT ["clearml_serving/engines/triton/entrypoint.sh"]
Empty file.
18 changes: 18 additions & 0 deletions clearml_serving/engines/triton/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# print configuration
echo CLEARML_SERVING_TASK_ID="$CLEARML_SERVING_TASK_ID"
echo CLEARML_TRITON_POLL_FREQ="$CLEARML_TRITON_POLL_FREQ"
echo CLEARML_TRITON_METRIC_FREQ="$CLEARML_TRITON_METRIC_FREQ"
echo CLEARML_TRITON_HELPER_ARGS="$CLEARML_TRITON_HELPER_ARGS"
echo EXTRA_PYTHON_PACKAGES="$EXTRA_PYTHON_PACKAGES"

# we should also have clearml-server configurations

if [ ! -z "$EXTRA_PYTHON_PACKAGES" ]
then
python3 -m pip install $EXTRA_PYTHON_PACKAGES
fi

# start service
PYTHONPATH=$(pwd) python3 clearml_serving/engines/triton/triton_helper.py $CLEARML_TRITON_HELPER_ARGS $@
6 changes: 6 additions & 0 deletions clearml_serving/engines/triton/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
clearml >= 1.3.1
clearml-serving
tritonclient[grpc]>=2.18.0,<2.19
grpcio
Pillow>=9.0.1,<10
pathlib2
Loading

0 comments on commit 0f809ef

Please # to comment.