diff --git a/README.md b/README.md index d0b504f7b9204d5f1cde9a86f23fe1d5cad49c15..313cbd57c6813ba03604434a62fb218417276e8b 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ ## TL;DR This repo contains code for python backend CTranslate2 based triton models for the SSMT project. -Prerequisites: `python3.xx-venv`, `nvidia-docker` +Prerequisites: `python3.xx-venv`, `nvidia-docker`, `bash` ```bash git clone https://ssmt.iiit.ac.in/meitygit/ssmt/mt-model-deploy-dhruva.git cd mt-model-deploy-dhruva -sh make_triton_model_repo.sh "https://ssmt.iiit.ac.in/uploads/data_mining/models.zip" "float16" +bash make_triton_model_repo.sh "https://ssmt.iiit.ac.in/uploads/data_mining/models.zip" "float16" docker build -t dhruva/ssmt-model-server:1 . nvidia-docker run --gpus=all --rm --shm-size 5g --network=host --name dhruva-ssmt-triton-server -v./ssmt_triton_repo:/models dhruva/ssmt-model-server:1 ``` @@ -37,7 +37,7 @@ One can construct the triton repo like so: ```bash git clone https://ssmt.iiit.ac.in/meitygit/ssmt/mt-model-deploy-dhruva.git cd mt-model-deploy-dhruva -sh make_triton_model_repo.sh "https://ssmt.iiit.ac.in/uploads/data_mining/models.zip" "float16" +bash make_triton_model_repo.sh "https://ssmt.iiit.ac.in/uploads/data_mining/models.zip" "float16" ``` ## Starting the triton server diff --git a/make_triton_model_repo.sh b/make_triton_model_repo.sh index 05a762052dae21c511db14f60d9bfc16335cf1bc..cbfff7ba9fd5fb8632158e1ea5696b42d622356a 100644 --- a/make_triton_model_repo.sh +++ b/make_triton_model_repo.sh @@ -1,3 +1,4 @@ +#!/bin/bash MODELS_URL=$1 QUANTIZATION=$2 wget -O models.zip $MODELS_URL --no-check-certificate @@ -46,7 +47,7 @@ cp -r ../triton_models/ssmt_template_model_repo ssmt_9_ct2 cp -r ../models/9_ct2 ssmt_9_ct2/1/translator sed -i 's/model_name/ssmt_9_ct2/' ssmt_9_ct2/config.pbtxt cd .. -source deactivate +source ./ssmt_ct2/bin/activate rm -rf ssmt_ct2 rm -f models.zip rm -rf models