|
|
|
FROM python:3.10
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
COPY requirements.txt requirements.txt
|
|
COPY . .
|
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
unzip \
|
|
wget \
|
|
curl \
|
|
xvfb \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
RUN wget -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
|
&& dpkg -i /tmp/chrome.deb || apt-get -fy install \
|
|
&& rm /tmp/chrome.deb
|
|
|
|
RUN CHROME_VERSION=$(google-chrome --version | awk '{print $3}') && \
|
|
wget -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chromedriver-linux64.zip && \
|
|
unzip /tmp/chromedriver.zip -d /usr/bin/ && \
|
|
chmod +x /usr/bin/chromedriver && \
|
|
rm /tmp/chromedriver.zip
|
|
|
|
|
|
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|