Docker image for running sleap-nn training and tracking workflows.
This container is designed primarily for running inside Pennsieve processors, where the platform provides INPUT_DIR and OUTPUT_DIR. It is also set up so the same behavior can be tested locally with docker run.
The entrypoint currently supports two modes:
traintrack
Run all commands below from inside sleap-docker-container/.
docker build -t sleap-uv .The local examples below assume this layout:
data/
input/
sleap_config.yaml
train.pkg.slp
val.pkg.slp
models/
my_first_model/
output/
This command runs:
sleap-nn train --config /app/input/sleap_config.yamlUse:
docker run --rm -it \
-e RUN_MODE=train \
-e INPUT_DIR=/app/input \
-e OUTPUT_DIR=/app/output \
-e CONFIG=sleap_config.yaml \
-v "$(pwd)/data/input":/app/input \
-v "$(pwd)/data/":/app/output \
sleap-uvThis command runs:
sleap-nn track \
--data_path /app/input/val.pkg.slp \
--model_paths /app/models/my_first_model/ \
-o /app/output/val.predictions.slpUse:
docker run --rm -it \
-e RUN_MODE=track \
-e INPUT_DIR=/app/input \
-e OUTPUT_DIR=/app/output \
-e MODEL_INPUT_DIR=/app/models \
-e DATA_PATH=val.pkg.slp \
-e MODEL_PATHS=my_first_model/ \
-e O=val.predictions.slp \
-v "$(pwd)/data/input":/app/input \
-v "$(pwd)/data/models":/app/models \
-v "$(pwd)/data/output":/app/output \
sleap-uvRUN_MODE:trainortrackINPUT_DIR: base directory for config and input dataOUTPUT_DIR: base directory for outputs and-oCONFIG: config file path relative toINPUT_DIRfortrainDATA_PATH: input file path relative toINPUT_DIRfortrackMODEL_PATHS: model directory path relative toMODEL_INPUT_DIRfortrackMODEL_INPUT_DIR: optional model base directory fortrack; defaults toINPUT_DIRO: output file path relative toOUTPUT_DIRfortrack
Pennsieve provides INPUT_DIR and OUTPUT_DIR. For Pennsieve, the preferred setup is to make all required tracking inputs available under INPUT_DIR. MODEL_INPUT_DIR is mainly useful for local Docker runs when models live outside the main input directory.