Mintplex-Labs / vector-admin

The universal tool suite for vector database management. Manage Pinecone, Chroma, Qdrant, Weaviate and more vector databases with ease.
https://vectoradmin.com/
MIT License
1.01k stars 173 forks source link

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum : "/document-processor": not found #99

Closed JairajGaur closed 6 months ago

JairajGaur commented 6 months ago

Hi, I'm trying to do docker build using the below command. However, this is generating the error during coping document-processor folder everytime. Could you please check and confirm if this is known issue and what's the resolution. I tried multiple solution but nothing worked for me.

Command : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command docker build --pull --rm -f "docker\Dockerfile" -t vectoradmin:latest "docker"


Error : -------------------- 75 | 76 | # Copy the document-processor 77 | >>> COPY ./document-processor/ ./document-processor/ 78 | 79 | # Install document-processor dependencies

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 5627e5d8-6272-4427-9297-c31a310b5758::5oax43ihn5e9096cd6sgw8e1w: "/document-processor": not found

Branch - master

timothycarambat commented 6 months ago

Can you try running docker build from within the docker/ folder instead of outside of it? The Docker context is not root of the repo and is instead from within the docker folder.

JairajGaur commented 6 months ago

It's working if I run below commands within the docker/. docker-compose up -d --build postgres docker-compose up -d --build vector-admin

But issue wasn't an issue few days back as I was able to build using Dockerfile directly. This started happening since yesterday.

timothycarambat commented 6 months ago

I just did a rebuild using docker-compose up -d --build vector-admin and did not crash. Im not sure how the document-processor folder is missing on your build, since that is typically the case of a COPY not working. The folder is there for sure?

timothycarambat commented 6 months ago

To add onto this, we also have automated docker builds that are pushed to Docker Hub which are also not failing

JairajGaur commented 6 months ago

I just did a rebuild using docker-compose up -d --build vector-admin and did not crash. Im not sure how the document-processor folder is missing on your build, since that is typically the case of a COPY not working. The folder is there for sure?

Yes, the folder is there for sure. The other way of running the docker for vector-admin and Postgres are working fine. Just one more extra point to add regarding my local setup. I'm using windows OS for my setup.

rawpixel-vincent commented 6 months ago

I had the same issue to build the image from the Dockerfile you need to run with the context at the root of the repo

From the root of the repository:

C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command docker build . --pull --rm -f "docker\Dockerfile" -t vectoradmin:latest "docker"

was running on linux so not entirely sure about the powershell syntax above

what worked for me

docker build . -f ./docker/Dockerfile

full script

git clone https://github.com/Mintplex-Labs/vector-admin.git
cd vector-admin
cp frontend/.env.example frontend/.env.production
# edit frontend/.env.production as needed for your environment
docker build . -f ./docker/Dockerfile --tag vectoradmin:build-xx
timothycarambat commented 6 months ago

Correct, referring to the docker-compose you can see the context is ../ when inside of the docker folder. So if not using the docker-compose in the repo you need to target the DockerFile from the root directory. Apologies for the confusion but then the paths during copying will be correct in the DockerFile.