| |
| FROM python:3.11-slim |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
| WORKDIR /app |
|
|
| |
| RUN apt-get update && \ |
| apt-get install -y --no-install-recommends \ |
| ca-certificates wget gnupg unzip procps curl lsb-release \ |
| fonts-liberation libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 \ |
| libxdamage1 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 \ |
| libatk1.0-0 libgtk-3-0 libnss3 libxss1 libgconf-2-4 libatk-bridge2.0-0 \ |
| libc6 libstdc++6 libu2f-udev libvulkan1 libxcb1 libxcb-shm0 libxcb-xfixes0 \ |
| libcap2 libxkbcommon0 fonts-noto-color-emoji && \ |
| apt-get clean && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN wget -q -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ |
| apt-get update && apt-get install -y /tmp/google-chrome.deb || apt-get -f install -y && \ |
| rm -f /tmp/google-chrome.deb && \ |
| ln -sf /opt/google/chrome/google-chrome /usr/bin/google-chrome |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY app.py . |
|
|
| EXPOSE 7860 |
| CMD ["python", "app.py"] |
|
|