A lightweight, single-inference ONNX Runtime Docker image for MobileNet. Wraps a MobileNet .onnx model in a CLI container that takes an image path, runs inference, and prints the top-1 label (e.g. 284: Siamese cat).
git clone https://github.com/enkaypeter/mobilenet-onnx-runner.git
cd mobilenet-onnx-runner/dockerdocker build -f docker/Dockerfile -t yourname/mobilenet-onnx-runner:latest .docker run --rm \
-v "$(pwd)/images:/app/images" \
yourname/mobilenet-onnx-runner:latest \
images/cat.jpgYou should see output like:
284: Siamese_catWe publish this image on Docker Hub as enkaypeter/mobilenet-onnx-runner:v0.1.0. No local build required:
docker run --rm \
-v "$(pwd)/images:/app/images" \
enkaypeter/mobilenet-onnx-runner:v0.1.0 \
images/cat.jpg- Based on MobileNetV2, exported with ONNX opset 10 using PyTorch 1.8
- Predictions use the
imagenet_class_index.jsonmapping from the official Keras reference.