A directory which talks to model containers via RPC system provided by CLIPPER. Only heartbeats messages implemented so far.
Follow the following steps -
- git clone https://github.com/alindkhare/clipper.git
- cd clipper/
- git checkout alind/cuda_pytorch1.2
- cd examples/image_query
- sh build_pytorch1.2_container.sh
This will build the docker image with the tag clipper/cuda10-pytorch1.2-py3.6-container .
Type the following commands -
- In RPC_TALKER directory, run file save_model_and_func.py by the command python save_model_and_func.py
- Note down the directory path printed while running this file (let's call this DIR). Keep this terminal tab open (call this tab A).
- In a new terminal window (call this tab B), type - docker run --runtime=nvidia -it --network host --name my-clipper clipper/cuda10-pytorch36-container bash
- On tab A, fire the following commands -
- docker cp rpc.py my-clipper:/container/
- docker cp DIR/* my-clipper:/model/
- On tab B, you are inside container. Do the following -
- export CLIPPER_MODEL_VERSION=v1
- export CLIPPER_INPUT_TYPE=bytes
- export CLIPPER_PORT=7999
- export CLIPPER_MODEL_PATH=/model/
- export CLIPPER_MODEL_NAME=r50
- On TAB A, start RPC_talker by command - python RPC_talker.py
- On TAB B (the docker container), run command - sh container_entry.sh "pytorch-container" pytorch_container.py