Spaces:
Sleeping
Sleeping
bunch of fixes to get it to work with a single docker cotainer. necessary evil for now.
Browse files- Dockerfile +1 -1
- api/db/vector_store.py +1 -1
- run.sh +5 -3
Dockerfile
CHANGED
@@ -20,7 +20,7 @@ RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
|
20 |
COPY --chown=user run.sh api fe .
|
21 |
|
22 |
# Expose the port the app runs on
|
23 |
-
EXPOSE 8080
|
24 |
|
25 |
#todo these keys are environment specific
|
26 |
ENV OPENAI_API_KEY=zzz
|
|
|
20 |
COPY --chown=user run.sh api fe .
|
21 |
|
22 |
# Expose the port the app runs on
|
23 |
+
EXPOSE 8080 8501
|
24 |
|
25 |
#todo these keys are environment specific
|
26 |
ENV OPENAI_API_KEY=zzz
|
api/db/vector_store.py
CHANGED
@@ -91,5 +91,5 @@ class QdrantVectorStore(Store):
|
|
91 |
def list_collections(self) -> list[dict]:
|
92 |
""" return a list of collections.
|
93 |
"""
|
94 |
-
return [ c for i,c in enumerate(self.client.get_collections().collections)]
|
95 |
|
|
|
91 |
def list_collections(self) -> list[dict]:
|
92 |
""" return a list of collections.
|
93 |
"""
|
94 |
+
return [ c.dict() for i,c in enumerate(self.client.get_collections().collections)]
|
95 |
|
run.sh
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
-
#!/bin/
|
2 |
python -m uvicorn "main:app" "--host" "0.0.0.0" "--port" "8080" &
|
3 |
-
python -m streamlit run app.py
|
4 |
|
|
|
|
|
5 |
|
6 |
-
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
python -m uvicorn "main:app" "--host" "0.0.0.0" "--port" "8080" &
|
|
|
3 |
|
4 |
+
#active wait- container won't quit
|
5 |
+
while ! timeout 1 bash -c "echo > /dev/tcp/localhost/8080"; do sleep 5; done
|
6 |
|
7 |
+
export be_url=`awk 'END{print "http://"$1":8080"}' /etc/hosts`
|
8 |
+
python -m streamlit run app.py
|