A server for running individual containerized tagger models and publishing tags.
- Server for orchestrating tagging jobs across multiple containerized models.
- Supports concurrent tagging across multiple tenants.
- Splits jobs across all available GPUs and implements simple queing when there are more jobs than GPUs.
- Offers an endpoint for finalizing tags by publishing to the Fabric.
- Podman with nvidia-toolkit enabled
- Python
- A podman image for each model you want to run. See the individual model repos for more information.
- A gpu, cpu inference is not yet supported.
- ssh key with github access to eluv-io
- Start podman API socket
systemctl --user start podman.socket - Add private keys to ssh agent (if you are on remote server):
ssh-add - Create new conda environment
conda create -n tagger-services python=3.10 - Activate the environment
conda activate tagger-services - Install dependencies
pip install .
- Podman with nvidia toolkit enabled installed on machine
- Access to qluvio repo via ssh key
ssh-add (on personal machine)
NOTE: if you are on a remote server, either you should have your ssh key on the remote server and run ssh-add there, or you should run it on your personal machine and verify that you are connected with agent forwarding enabled.
./build.sh
You will also need a tagger-config.yml file in the data directory,
which in the example is data under the current directory.
Note that you need to specify the same path inside and outside of the container for the data directory, as docker images are started with mountpoints specified. (Since the podman socket is passed in, the tagger starts container jobs on the host's podman so the container needs to understand the host directory layout; mounting under the same path in the container insures this.) For a similar reason you need to pass all GPUs; GPUs are passed to containers using host GPU numbers so the tagger container needs all GPUs so the GPU numbers are right.
podman run --device nvidia.com/gpu=all -p 8086:8086 -v /run/user/$(id -u)/podman:/run/user/0/podman -v $(pwd)/data:$(pwd)/data content-tagger --directory $(pwd)/data --host 0.0.0.0
python server.py --port <PORT_NUMBER>
Check out the swagger docs in api.yaml