Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
920 changes: 213 additions & 707 deletions README.md

Large diffs are not rendered by default.

203 changes: 0 additions & 203 deletions README_ENVECTOR.md

This file was deleted.

60 changes: 21 additions & 39 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,52 @@


def docker_tag_base():
return 'vdbbench'
return "vdbbench"


def dockerfile_path_base():
return os.path.join('vectordb_bench/', '../Dockerfile')
return os.path.join("vectordb_bench/", "../Dockerfile")


def docker_tag(track, algo):
return docker_tag_base() + '-' + track + '-' + algo
return docker_tag_base() + "-" + track + "-" + algo


def build(tag, args, dockerfile):
print('Building %s...' % tag)
print("Building %s..." % tag)
if args is not None and len(args) != 0:
q = " ".join(["--build-arg " + x.replace(" ", "\\ ") for x in args])
else:
q = ""

try:
command = 'docker build %s --rm -t %s -f' \
% (q, tag)
command += ' %s .' % dockerfile
command = "docker build %s --rm -t %s -f" % (q, tag)
command += " %s ." % dockerfile
print(command)
subprocess.check_call(command, shell=True)
return {tag: 'success'}
return {tag: "success"}
except subprocess.CalledProcessError:
return {tag: 'fail'}
return {tag: "fail"}


def build_multiprocess(args):
return build(*args)


if __name__ == "__main__":
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
"--proc",
default=1,
type=int,
help="the number of process to build docker images")
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--proc", default=1, type=int, help="the number of process to build docker images")
parser.add_argument("--track", choices=["none"], default="none")
parser.add_argument("--algorithm", metavar="NAME", help="build only the named algorithm image", default=None)
parser.add_argument(
'--track',
choices=['none'],
default='none'
"--dockerfile", metavar="PATH", help="build only the image from a Dockerfile path", default=None
)
parser.add_argument(
'--algorithm',
metavar='NAME',
help='build only the named algorithm image',
default=None)
parser.add_argument(
'--dockerfile',
metavar='PATH',
help='build only the image from a Dockerfile path',
default=None)
parser.add_argument(
'--build-arg',
help='pass given args to all docker builds',
nargs="+")
parser.add_argument("--build-arg", help="pass given args to all docker builds", nargs="+")
args = parser.parse_args()

print('Building base image...')

subprocess.check_call(
'docker build \
--rm -t %s -f %s .' % (docker_tag_base(), dockerfile_path_base()), shell=True)
print("Building base image...")

print('Building end.')
subprocess.check_call("docker build \
--rm -t %s -f %s ." % (docker_tag_base(), dockerfile_path_base()), shell=True)

print("Building end.")
42 changes: 0 additions & 42 deletions scripts/envector_bloomberg_config.yml

This file was deleted.

42 changes: 0 additions & 42 deletions scripts/envector_pubmed_config.yml

This file was deleted.

Loading