hackrx / Dockerfile
Rahul-Samedavar's picture
fixing docker 2
7a49d2a
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"]