jatinmehra commited on
Commit
0c1e8a6
·
verified ·
1 Parent(s): c36535a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -2
Dockerfile CHANGED
@@ -5,21 +5,38 @@ COPY requirements.txt requirements.txt
5
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  RUN apt-get update && \
9
  apt-get install -y --no-install-recommends \
10
- wkhtmltopdf \
11
  xvfb \
12
  xfonts-75dpi \
13
  xfonts-base \
14
- && apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
15
 
16
  COPY . .
17
 
18
  ARG GEMINI_API_KEY
 
 
19
  RUN --mount=type=secret,id=GEMINI_API_KEY,mode=0444,required=true \
20
  export GROQ_API_KEY=$(cat /run/secrets/GEMINI_API_KEY) && \
21
  echo "GEMINI_API_KEY is set."
22
 
 
 
 
 
23
  ENV GEMINI_API_KEY=${GEMINI_API_KEY}
 
24
 
25
  CMD ["python", "main.py"]
 
5
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
+ # Install prerequisites and wkhtmltopdf manually
9
  RUN apt-get update && \
10
  apt-get install -y --no-install-recommends \
11
+ wget \
12
  xvfb \
13
  xfonts-75dpi \
14
  xfonts-base \
15
+ fontconfig \
16
+ libxrender1 \
17
+ libxext6 \
18
+ && rm -rf /var/lib/apt/lists/* \
19
+ && wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb -O /tmp/wkhtmltox.deb \
20
+ && apt-get update \
21
+ && apt-get install -y /tmp/wkhtmltox.deb \
22
+ && rm /tmp/wkhtmltox.deb \
23
+ && apt-get clean \
24
+ && rm -rf /var/lib/apt/lists/*
25
 
26
  COPY . .
27
 
28
  ARG GEMINI_API_KEY
29
+ ARG TAVILY_API_KEY
30
+
31
  RUN --mount=type=secret,id=GEMINI_API_KEY,mode=0444,required=true \
32
  export GROQ_API_KEY=$(cat /run/secrets/GEMINI_API_KEY) && \
33
  echo "GEMINI_API_KEY is set."
34
 
35
+ RUN --mount=type=secret,id=TAVILY_API_KEY,mode=0444,required=true \
36
+ export TAVILY_API_KEY=$(cat /run/secrets/TAVILY_API_KEY) && \
37
+ echo "TAVILY_API_KEY is set."
38
+
39
  ENV GEMINI_API_KEY=${GEMINI_API_KEY}
40
+ ENV TAVILY_API_KEY=${TAVILY_API_KEY}
41
 
42
  CMD ["python", "main.py"]