summaryrefslogtreecommitdiff
path: root/megapixels/commands/faiss/sync.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-12-14 02:31:56 +0100
committerJules Laplace <julescarbon@gmail.com>2018-12-14 02:31:56 +0100
commit9e7713e83a99d8ca50ffff49def7085bb8f4e09c (patch)
treef10311db0044d922b937388ad20fcc2f4f14dac0 /megapixels/commands/faiss/sync.py
parent2085381043e95d88704ede0fc92a5f129bde466d (diff)
faiss cli lib
Diffstat (limited to 'megapixels/commands/faiss/sync.py')
-rw-r--r--megapixels/commands/faiss/sync.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/megapixels/commands/faiss/sync.py b/megapixels/commands/faiss/sync.py
new file mode 100644
index 00000000..ae13b948
--- /dev/null
+++ b/megapixels/commands/faiss/sync.py
@@ -0,0 +1,17 @@
+"""
+Sync the FAISS metadata
+"""
+
+import subprocess
+import click
+
+from app.settings import app_cfg as cfg
+
+@click.command()
+@click.pass_context
+def cli(ctx):
+ sts = call([
+ "s3cmd", "sync",
+ "s3://megapixels/v1/metadata/",
+ cfg.DIR_FAISS_METADATA,
+ ])