Skip to content

Latest commit

 

History

History
79 lines (44 loc) · 1.32 KB

DEVELOP.MD

File metadata and controls

79 lines (44 loc) · 1.32 KB

Development environment

Here are the commands to set up the development environment. The containers share several synchronized folders among them, ensuring that you only need to run the following command once you make a change:

Building the containers

docker-compose build

Running the containers

docker-compose up -d

Creating the mar files in the "build" continaer

docker-compose exec build bash

## Encoder
torch-model-archiver \
    --model-name sam_vit_h_encode \
    --version 1.0.0 \
    --serialized-file model-weights/sam_vit_h_4b8939.pth \
    --handler handler_encode.py \
    --export-path model-store \
    --force

## Decoder
torch-model-archiver \
    --model-name sam_vit_h_decode \
    --version 1.0.0 \
    --serialized-file model-store/sam_vit_h_decode.onnx \
    --handler handler_decode.py \
    --export-path ./model-store \
    --force

Starting decoder service

docker-compose exec cpu bash
torchserve --foreground --ts-config ./deployment/config_decode.properties

Starting encode service

docker-compose exec gpu bash
torchserve --foreground --ts-config ./deployment/config_encoder.properties

Access the local services at: