yusufenes commited on
Commit
863c90a
·
verified ·
1 Parent(s): 25c9b64

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +57 -34
Dockerfile CHANGED
@@ -1,34 +1,57 @@
1
- # Base image olarak Python 3.10 kullan
2
- FROM python:3.10
3
-
4
- # Çalışma dizinini oluştur
5
- WORKDIR /app
6
-
7
- # Gerekli dosyaları container içine kopyala
8
- COPY requirements.txt requirements.txt
9
- COPY . .
10
-
11
- # Gerekli paketleri yükle
12
- RUN pip install --no-cache-dir -r requirements.txt
13
-
14
- # Selenium için Chrome ve WebDriver yükle
15
- RUN apt-get update && apt-get install -y \
16
- unzip \
17
- wget \
18
- curl \
19
- xvfb \
20
- && rm -rf /var/lib/apt/lists/*
21
-
22
- # Google Chrome yükle
23
- RUN wget -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
24
- && dpkg -i /tmp/chrome.deb || apt-get -fy install \
25
- && rm /tmp/chrome.deb
26
-
27
- RUN CHROME_VERSION=$(google-chrome --version | awk '{print $3}') && \
28
- wget -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chromedriver-linux64.zip && \
29
- unzip /tmp/chromedriver.zip -d /usr/bin/ && \
30
- chmod +x /usr/bin/chromedriver && \
31
- rm /tmp/chromedriver.zip
32
-
33
- # Streamlit uygulamasını çalıştır
34
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image olarak Python 3.10 kullan
2
+ FROM python:3.10-slim
3
+
4
+ # Çalışma dizinini oluştur
5
+ WORKDIR /app
6
+
7
+ # Gerekli sistem paketlerini yükle
8
+ RUN apt-get update && apt-get install -y \
9
+ wget \
10
+ gnupg \
11
+ unzip \
12
+ xvfb \
13
+ libglib2.0-0 \
14
+ libnss3 \
15
+ libgconf-2-4 \
16
+ libfontconfig1 \
17
+ libx11-6 \
18
+ libx11-xcb1 \
19
+ libxcb1 \
20
+ libxcomposite1 \
21
+ libxcursor1 \
22
+ libxdamage1 \
23
+ libxext6 \
24
+ libxfixes3 \
25
+ libxi6 \
26
+ libxrandr2 \
27
+ libxrender1 \
28
+ libxss1 \
29
+ libxtst6 \
30
+ libgbm1 \
31
+ && rm -rf /var/lib/apt/lists/*
32
+
33
+ # Google Chrome repository ekle ve yükle
34
+ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
35
+ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
36
+ && apt-get update \
37
+ && apt-get install -y google-chrome-stable \
38
+ && rm -rf /var/lib/apt/lists/*
39
+
40
+ # ChromeDriver yükle
41
+ RUN CHROME_VERSION=$(google-chrome --version | awk '{print $3}') \
42
+ && wget -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chromedriver-linux64.zip \
43
+ && unzip /tmp/chromedriver.zip -d /usr/local/bin/ \
44
+ && mv /usr/local/bin/chromedriver-linux64/chromedriver /usr/local/bin/ \
45
+ && rm -rf /usr/local/bin/chromedriver-linux64 \
46
+ && chmod +x /usr/local/bin/chromedriver \
47
+ && rm /tmp/chromedriver.zip
48
+
49
+ # Gerekli dosyaları container içine kopyala
50
+ COPY requirements.txt requirements.txt
51
+ COPY . .
52
+
53
+ # Gerekli Python paketlerini yükle
54
+ RUN pip install --no-cache-dir -r requirements.txt
55
+
56
+ # Streamlit uygulamasını çalıştır
57
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]