yusufenes's picture
Upload Dockerfile
a996d09 verified
raw
history blame
1.15 kB
# Base image olarak Python 3.10 kullan
FROM python:3.10
# Çalışma dizinini oluştur
WORKDIR /app
# Gerekli dosyaları container içine kopyala
COPY requirements.txt requirements.txt
COPY . .
# Gerekli paketleri yükle
RUN pip install --no-cache-dir -r requirements.txt
# Selenium için Chrome ve WebDriver yükle
RUN apt-get update && apt-get install -y \
unzip \
wget \
curl \
xvfb \
&& rm -rf /var/lib/apt/lists/*
# Google Chrome yükle
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
# Streamlit uygulamasını çalıştır
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]