Open andora2 opened 1 month ago
@ElishaKay
@andora2 what machine are you using?
I tried out this Dockerfile on Mac on the Master Branch and it crashed with the error below. Also, is this Dockerfile you propose a lighter or heavier image? Feel free to create a PR with the proposed changes - (seems like you want to add some stuff to requirements.txt as well) and we'll take it from there
3.908 ERROR: Could not find a version that satisfies the requirement playwright (from versions: none)
3.908 ERROR: No matching distribution found for playwright
------
failed to solve: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
Hi,
machine is: windows 10 The error I see is because playwright is still in the requirements.txt, and that has to fail. Alpine forces us to deal with playwright and pymupdf separately => in the Dockerfile itself. (I did mention that in my suggestion) So no, I didn't have to add anything to the requirements.txt rather comment out playwright and pymupdf (please check the docker delta and my suggestion again, it is mentioned there).
I would have PR this, but it needs some cleancode beautifying steps and unfortunately I'll not make it any time soon (if at all). I had to solve this issue for a dedicated topic but nothing more then that.I thought I could at least let you know.
Take care, Adrian
Hi,
please find bellow a less vulnerable docker setup as a improvement suggestion. It reduces theproblem from this [8C, 34H, 32M, 98L Issues]: ..> docker scout quickview
TO this [-C, 1H, 3M, 0L Issues]:
![image](https://github.com/assafelovic/gpt-researcher/assets/12798472/82993eb9-3215-42c4-98ea-35f34209427d)
The main solution is to use alpine instead of debian::bullseye. (bookworm removed the criticals but had still quite some High vuln. issues). Using alpine required to help playwright and pymupdf to pip install successfully, but finaly it worked out.
The app works like a charm.
Though I think the Dockerfile image layer concept might profit from some improvement as well.
Please checkout yourself, and update the dockerfile and requirements.txt for the sake of less vulnerable instances out there :o) Reg. requirements.txt: you just have to exclude playwright and pymupdf since the pip install is done in the docker (not necessary a final requirement, but was good enough for me)
Here the DOCKERFILE: