You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the system is starterd using containers the default documentation/embeddings are downloaded in the wrong folder of the conatianer.
The documentation get downloaded in /app/vectors instead of /app/application/vectors
Here is just a quick workaround, but not a fix. Documentation should be written in the folder defined by settings.
@user.route("/api/docs_check", methods=["POST"])
def check_docs():
# check if docs exist in a vectorstore folder
data = request.get_json()
# split docs on / and take first part
if data["docs"].split("/")[0] == "local":
return {"status": "exists"}
vectorstore = "vectors/" + data["docs"]
base_path = "https://raw.githubusercontent.com/arc53/DocsHUB/main/"
if os.path.exists("application/" + vectorstore) or data["docs"] == "default":
print(f"{vectorstore}")
return {"status": "exists"}
else:
r = requests.get(base_path + vectorstore + "index.faiss")
if r.status_code != 200:
return {"status": "null"}
else:
vectorstore2 = "**application**/" + vectorstore #should be set by using settings
if not os.path.exists(vectorstore2):
os.makedirs(vectorstore2)
with open(vectorstore2 + "index.faiss", "wb") as f:
f.write(r.content)
# download the store
r = requests.get(base_path + vectorstore + "index.pkl")
with open(vectorstore2 + "index.pkl", "wb") as f:
f.write(r.content)
return {"status": "loaded"}
👟 Reproduction steps
Use a clean environment
Download from git
Configure .env with your settings
Start with containers
Call check_docs with a default existing embedding "python/pandas/1.5.3/openai_text-embedding-ada-002/"
👍 Expected behavior
Browse inside the container.
Expected: documentation has been downloaded in /app/application/vectors
👎 Actual Behavior with Screenshots
Happens: You see documentation in /app/vectors
💻 Operating system
Linux
What browsers are you seeing the problem on?
No response
🤖 What development environment are you experiencing this bug on?
Docker
🔒 Did you set the correct environment variables in the right path? List the environment variable names (not values please!)
No response
📃 Provide any additional context for the Bug.
No response
📖 Relevant log output
No response
👀 Have you spent some time to check if this bug has been raised before?
I checked and didn't find similar issue
🔗 Are you willing to submit PR?
Yes, I am willing to submit a PR!
🧑⚖️ Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
📜 Description
When the system is starterd using containers the default documentation/embeddings are downloaded in the wrong folder of the conatianer.
The documentation get downloaded in /app/vectors instead of /app/application/vectors
Here is just a quick workaround, but not a fix. Documentation should be written in the folder defined by settings.
@user.route("/api/docs_check", methods=["POST"])
def check_docs():
# check if docs exist in a vectorstore folder
data = request.get_json()
# split docs on / and take first part
if data["docs"].split("/")[0] == "local":
return {"status": "exists"}
vectorstore = "vectors/" + data["docs"]
base_path = "https://raw.githubusercontent.com/arc53/DocsHUB/main/"
if os.path.exists("application/" + vectorstore) or data["docs"] == "default":
print(f"{vectorstore}")
return {"status": "exists"}
else:
r = requests.get(base_path + vectorstore + "index.faiss")
👟 Reproduction steps
👍 Expected behavior
Browse inside the container.
Expected: documentation has been downloaded in /app/application/vectors
👎 Actual Behavior with Screenshots
Happens: You see documentation in /app/vectors
💻 Operating system
Linux
What browsers are you seeing the problem on?
No response
🤖 What development environment are you experiencing this bug on?
Docker
🔒 Did you set the correct environment variables in the right path? List the environment variable names (not values please!)
No response
📃 Provide any additional context for the Bug.
No response
📖 Relevant log output
No response
👀 Have you spent some time to check if this bug has been raised before?
🔗 Are you willing to submit PR?
Yes, I am willing to submit a PR!
🧑⚖️ Code of Conduct
The text was updated successfully, but these errors were encountered: