What happened?
Running inference-engine deploy ./sentiment.pkl writes the generated pipeline definition and artifact to the host filesystem:
models/sentiment/v1/definition.py
models/sentiment/v1/sentiment.pkl
But docker-compose.yml mounts the models directory as a named Docker volume, not a bind-mount:
# api and worker both have:
volumes:
- models:/app/models
A named volume is managed by Docker's storage backend — it is not the host's ./models/ directory. The container never sees what the CLI wrote. The model cannot be served. Calling POST /admin/models/sentiment/v1/reload returns 404 because the definition file does not exist inside the container.
Additionally, models/ is not in .gitignore, so artifact files (including large .pkl/.onnx binaries) can be accidentally committed.
Steps to reproduce
- Start the full stack:
bash dev.sh
- Deploy a model:
inference-engine deploy ./sentiment.pkl --name sentiment --version v1 --sample-input "great"
- Attempt hot-reload:
curl -X POST http://localhost:8000/admin/models/sentiment/v1/reload -H "X-API-Key: admin-key"
- Attempt inference:
curl -X POST http://localhost:8000/predict -H "X-API-Key: dev-key" -d '{"model":"sentiment","version":"v1","data":"great"}'
Both step 3 and step 4 return 404 — the model does not exist inside the container.
Expected behavior
After inference-engine deploy, the deployed model is immediately available to the running container. POST /admin/models/<name>/<version>/reload returns 200 and subsequent /predict calls succeed — no container restart, no manual file copy.
Environment
- Affects all OS where Docker Compose is used
- Python version: 3.12+
- Inference Engine version/commit: current
main
- Execution backend: any (the bug is at the volume layer, not the executor)
Relevant logs or error output
# POST /admin/models/sentiment/v1/reload
HTTP 404 {"detail": "Model not found: sentiment v1"}
# The file exists on the host but not in the container:
$ ls models/sentiment/v1/
definition.py sentiment.pkl
$ docker compose exec api ls /app/models/
(empty — named volume has no files)
What happened?
Running
inference-engine deploy ./sentiment.pklwrites the generated pipeline definition and artifact to the host filesystem:But
docker-compose.ymlmounts the models directory as a named Docker volume, not a bind-mount:A named volume is managed by Docker's storage backend — it is not the host's
./models/directory. The container never sees what the CLI wrote. The model cannot be served. CallingPOST /admin/models/sentiment/v1/reloadreturns 404 because the definition file does not exist inside the container.Additionally,
models/is not in.gitignore, so artifact files (including large.pkl/.onnxbinaries) can be accidentally committed.Steps to reproduce
bash dev.shinference-engine deploy ./sentiment.pkl --name sentiment --version v1 --sample-input "great"curl -X POST http://localhost:8000/admin/models/sentiment/v1/reload -H "X-API-Key: admin-key"curl -X POST http://localhost:8000/predict -H "X-API-Key: dev-key" -d '{"model":"sentiment","version":"v1","data":"great"}'Both step 3 and step 4 return 404 — the model does not exist inside the container.
Expected behavior
After
inference-engine deploy, the deployed model is immediately available to the running container.POST /admin/models/<name>/<version>/reloadreturns 200 and subsequent/predictcalls succeed — no container restart, no manual file copy.Environment
mainRelevant logs or error output