philmui commited on
Commit
e11a5e8
1 Parent(s): 28b6560

updated Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. semantic.py +11 -10
Dockerfile CHANGED
@@ -5,8 +5,9 @@ ENV HOME=/home/user \
5
  PATH=/home/user/.local/bin:$PATH
6
  WORKDIR /home/user/app
7
  COPY --chown=user . $HOME/app
 
8
  COPY ./requirements.txt ~/app/requirements.txt
9
- RUN pip install -r requirements.txt
10
  COPY . .
11
  CMD ["chainlit", "run", "app.py", "--port", "7860"]
12
 
 
5
  PATH=/home/user/.local/bin:$PATH
6
  WORKDIR /home/user/app
7
  COPY --chown=user . $HOME/app
8
+ RUN python -m pip install --upgrade pip setuptools
9
  COPY ./requirements.txt ~/app/requirements.txt
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
  COPY . .
12
  CMD ["chainlit", "run", "app.py", "--port", "7860"]
13
 
semantic.py CHANGED
@@ -64,19 +64,20 @@ class SemanticStoreFactory:
64
  # check if path exists and if it is not empty
65
  if path.exists() and path.is_dir() and any(path.iterdir()):
66
  _logger.info(f"\tQdrant loading ...")
67
- # store = Qdrant.from_documents(
68
- # [],
69
- # embeddings=embeddings,
70
- # path=VECTOR_STORE_PATH,
71
- # prefer_grpc=True,
72
- # collection_name=META_SEMANTIC_COLLECTION,
73
- # )
74
-
75
- store = Qdrant(
76
- client=qclient,
77
  embeddings=embeddings,
 
 
 
78
  collection_name=META_SEMANTIC_COLLECTION,
79
  )
 
 
 
 
 
 
80
  else:
81
  _logger.info(f"\tQdrant creating ...")
82
  store = cls.__create_semantic_store()
 
64
  # check if path exists and if it is not empty
65
  if path.exists() and path.is_dir() and any(path.iterdir()):
66
  _logger.info(f"\tQdrant loading ...")
67
+ store = Qdrant.from_documents(
68
+ [],
 
 
 
 
 
 
 
 
69
  embeddings=embeddings,
70
+ location=":memory:",
71
+ # path=META_10K_FILE_PATH,
72
+ prefer_grpc=True,
73
  collection_name=META_SEMANTIC_COLLECTION,
74
  )
75
+
76
+ # store = Qdrant(
77
+ # client=qclient,
78
+ # embeddings=embeddings,
79
+ # collection_name=META_SEMANTIC_COLLECTION,
80
+ # )
81
  else:
82
  _logger.info(f"\tQdrant creating ...")
83
  store = cls.__create_semantic_store()