|
|
|
FROM python:3.10-slim |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY . /app |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y \ |
|
wget \ |
|
curl \ |
|
unzip \ |
|
libx11-dev \ |
|
libx11-xcb1 \ |
|
libxcb1 \ |
|
libgdk-pixbuf2.0-0 \ |
|
libnss3 \ |
|
libatk-bridge2.0-0 \ |
|
libatk1.0-0 \ |
|
libdrm2 \ |
|
libdbus-1-3 \ |
|
libgbm1 \ |
|
libnspr4 \ |
|
libxcomposite1 \ |
|
libxrandr2 \ |
|
libgtk-3-0 \ |
|
libasound2 \ |
|
libxss1 \ |
|
fonts-liberation \ |
|
libappindicator3-1 \ |
|
libu2f-udev \ |
|
xdg-utils \ |
|
libvulkan1 \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ |
|
dpkg -i google-chrome-stable_current_amd64.deb || apt-get install -fy && \ |
|
rm google-chrome-stable_current_amd64.deb |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
EXPOSE 8000 |
|
|
|
|
|
RUN chmod +x /app/init_chrome.sh |
|
|
|
|
|
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] |