Closed CevreMuhendisi closed 6 months ago
try to create a folder named faiss_index then re create the container
try to create a folder named faiss_index then re create the container
Runtime error :(
RuntimeError: Error in faiss::FileIOWriter::FileIOWriter(const char) at /project/faiss/faiss/impl/io.cpp:97: Error: 'f' failed: could not open faiss_index/index.faiss for writing: Permission denied
Traceback:
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
exec(code, module.dict)
File "/app/app.py", line 144, in
@CevreMuhendisi
The user "appuser" does not have ownership of the folder "app", where faiss is attempting to store vectors. I fixed this by adding the following to the dockerfile. The line should be added just after creating the user with the "adduser" command.
[...]
# Change the ownership of the /app directory to appuser
RUN chown appuser:appuser /app
[...]
Simply save the dockerfile, run docker compose again, and it should work as it did for me.
And remember to press "Submit & Process" in the interface ;)
@Dribo create a pull request with changes you suggest
Issue is resolved
Does work, thanks
I used a Docker image, but it's giving an error. I'm getting the following error
PermissionError: [Errno 13] Permission denied: 'faiss_index' Traceback: File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script exec(code, module.dict) File "/app/app.py", line 144, in
main()
File "/app/app.py", line 103, in main
get_vector_store(text_chunks)
File "/app/app.py", line 44, in get_vector_store
vector_store.save_local("faiss_index")
File "/usr/local/lib/python3.10/site-packages/langchain_community/vectorstores/faiss.py", line 1078, in save_local
path.mkdir(exist_ok=True, parents=True)
File "/usr/local/lib/python3.10/pathlib.py", line 1173, in mkdir
self._accessor.mkdir(self, mode)