forked from JosemyDuarte/gpt-researcher-ollama
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (24 loc) · 1002 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.11.4-slim-bullseye as install-browser
RUN apt-get update \
&& apt-get satisfy -y \
"chromium, chromium-driver (>= 115.0)" \
&& chromium --version && chromedriver --version
RUN apt-get update \
&& apt-get install -y --fix-missing firefox-esr wget \
&& wget https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz \
&& tar -xvzf geckodriver* \
&& chmod +x geckodriver \
&& mv geckodriver /usr/local/bin/
FROM install-browser as gpt-researcher-install
ENV PIP_ROOT_USER_ACTION=ignore
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
COPY ./requirements.txt ./requirements.txt
RUN pip install -r requirements.txt
FROM gpt-researcher-install AS gpt-researcher
RUN useradd -ms /bin/bash gpt-researcher \
&& chown -R gpt-researcher:gpt-researcher /usr/src/app
USER gpt-researcher
COPY --chown=gpt-researcher:gpt-researcher ./ ./
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]