Skip to content

Commit

Permalink
Added dockerfile for core index build library
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan Chitale <[email protected]>
  • Loading branch information
rchitale7 committed Mar 4, 2025
1 parent 1f19156 commit d6f847a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions remote_vector_index_builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM rchitale7/remote-index-build-service:faiss-base

WORKDIR /app

COPY core/requirements.txt /app/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt

COPY . /app

CMD ["python", "test_imports.py"]
1 change: 1 addition & 0 deletions remote_vector_index_builder/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
from .tasks import create_vectors_dataset, upload_index
21 changes: 21 additions & 0 deletions remote_vector_index_builder/test_imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.

def test_imports():
try:
from core import create_vectors_dataset
from core import upload_index
# etc.
print("All imports successful!")
return 0
except ImportError as e:
print(f"Import failed: {e}")
exit(1)

if __name__ == "__main__":
test_imports()

0 comments on commit d6f847a

Please sign in to comment.