Note: You can substitute docker for podman in these instructions.
podman build -t mattf/nutai:latest .
podman build -t nutai:latest .
podman run --name nutai -p 5000:5000 -d nutai
curl 127.1:5000/documents/0
: "Not Found"
curl -d '"z e r o"' -H 'Content-Type: application/json' 127.1:5000/documents/0
: 200
curl 127.1:5000/documents/0
: '[{"id": "0", "score": 0}]'
curl -d '"o r e z"' -H 'Content-Type: application/json' 127.1:5000/documents/0
: "Document already exists"
curl -d '"o n e"' -H 'Content-Type: application/json' 127.1:5000/documents/1
: 200
curl 127.1:5000/documents/1
: '[{"id": "0", "score": 0}, {"id": "1", "score": 0}]'
Assuming you have a model built and stored in your current directory as d2v.model
podman run --name nutai -p 5000:5000 -v .:/model:ro,Z -d nutai -- doc2vec /model/d2v.model
Do this when you want to restart the service and not lose anything that was added. Of course, if you restart Redis you'll lose anything it hasn't persisted.
podman run --name nutai-redis -p 6379:6379 -d redis
Content type
Image
Digest
Size
353.1 MB
Last updated
over 6 years ago
docker pull mattf/nutai