File size: 1,163 Bytes
68e7a9e
a4704d5
7a49d2a
68e7a9e
 
 
 
 
d39a9d7
68e7a9e
a4704d5
d12e55c
 
5ed1355
 
68e7a9e
d39a9d7
68e7a9e
a4704d5
7a49d2a
d39a9d7
 
68e7a9e
 
a4704d5
68e7a9e
 
 
 
 
 
 
 
 
 
 
9984dc0
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
36
37
38
FROM python:3.11

# Install system dependencies + Chromium driver (Debian package)
RUN apt-get update && apt-get install -y \
    wget \
    gnupg \
    unzip \
    curl \
    chromium-driver \
    && rm -rf /var/lib/apt/lists/*

# Add Google Chrome repo (Bookworm-safe, no apt-key)
RUN wget -q -O /usr/share/keyrings/google-chrome.gpg https://dl.google.com/linux/linux_signing_key.pub \
    && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" \
    > /etc/apt/sources.list.d/google-chrome.list \
    && apt-get update \
    && apt-get install -y google-chrome-stable \
    && rm -rf /var/lib/apt/lists/*

# (Optional) Check versions in build logs
RUN google-chrome --version && chromedriver --version || true

# Set up the working directory
WORKDIR /code

# Copy requirements and install Python dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the application
COPY . /code/

# Expose port
EXPOSE 7860

# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]