forked from assafelovic/gpt-researcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 1000 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
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 install -y 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", "--reload", "--log-level", "debug"]