private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

How to delete ingested files from PGPT in DOCKER

Open CRPrinzler opened this issue 1 year ago • 7 comments

How is make wipe implemented into the dockerized version of PGPT? I have the container running and it works fine, but I cannot se how to invoke deletion of ingested context.

CRPrinzler avatar Jan 30 '24 09:01 CRPrinzler

You could use the API, or just use docker exec...

docker exec -it privategpt make wipe

Make sure to use whatever you named the container. You can also just execute bash to get a shell.

icsy7867 avatar Jan 30 '24 21:01 icsy7867

via docker gives :

OCI runtime exec failed: exec failed: unable to start container process: exec: "make": executable file not found in $PATH: unknown

CRPrinzler avatar Jan 31 '24 07:01 CRPrinzler

via docker gives :

OCI runtime exec failed: exec failed: unable to start container process: exec: "make": executable file not found in $PATH: unknown

Whats your docker file look like? Drop into a bash shell and make sure you are in the proper work directory:

docker exec -it privategpt bash

icsy7867 avatar Jan 31 '24 14:01 icsy7867

I am, but it says /home/worker/app/

make not found

CRPrinzler avatar Feb 07 '24 15:02 CRPrinzler

install make into the container.

docker exec -it privategpt apt update && apt install make -y

or for ubuntu i think you need "build-essentials". However if that is there, then it's probably just a path issue. Then you could try:

/usr/bin/make wipe

Since the provided container is using multiple workers, I dont think any of this stuff is installed perhaps. If you can't use apt, you probably need to run as root:

docker run --rm
    --user=root privategpt bash

or something like that.

I actually re-wrote my docker file to just pull the github project in, as the original method seemed to be missing files.

icsy7867 avatar Feb 07 '24 18:02 icsy7867

yes I am in the correkt folder: /home/worker/app

I haven't got make or sudo.

CRPrinzler avatar Feb 08 '24 11:02 CRPrinzler

Essentially I just went in and rm -rf under local_data . ..

CRPrinzler avatar Feb 09 '24 07:02 CRPrinzler