Skip to content

Use Ctranslate2 with NLLB-200 inside a docker container with GPUs

Notifications You must be signed in to change notification settings

hobodrifterdavid/nllb-docker-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nllb-docker-rest

Use Ctranslate2 with NLLB-200 inside a docker container with GPUs. You will need a gpu-enabled version of Docker installed, see NVIDIA docs for instructions for setting that up.

Prepare NLLB model

Download the model to nllb-200-3.3B folder.

Convert it using the tool from ctranslate2 lib: ct2-transformers-converter --model nllb-200-3.3B/ --output_dir nllb-200-3.3B-converted

Build container:

docker build -t nllb .

Run container interactive mode with GPUs 0 and 1:

docker run -it --rm --gpus '"device=0,1"' -p 8000:8000 -v $(pwd):/app nllb

If running with different (number) of gpus, also adjust device_index in translate.py

Test request:

chmod +x test.sh ./test.sh

About

Use Ctranslate2 with NLLB-200 inside a docker container with GPUs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published