Wanderhalleylee commited on
Commit
cd0aad4
verified
1 Parent(s): a9cff6b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +66 -66
Dockerfile CHANGED
@@ -1,66 +1,66 @@
1
- undefinedFROM python:3.10-slim
2
-
3
- # Instalar depend锚ncias do sistema para Chrome
4
- RUN apt-get update && apt-get install -y \
5
- wget \
6
- gnupg2 \
7
- unzip \
8
- curl \
9
- fonts-liberation \
10
- libasound2 \
11
- libatk-bridge2.0-0 \
12
- libatk1.0-0 \
13
- libatspi2.0-0 \
14
- libcups2 \
15
- libdbus-1-3 \
16
- libdrm2 \
17
- libgbm1 \
18
- libgtk-3-0 \
19
- libnspr4 \
20
- libnss3 \
21
- libwayland-client0 \
22
- libxcomposite1 \
23
- libxdamage1 \
24
- libxfixes3 \
25
- libxkbcommon0 \
26
- libxrandr2 \
27
- xdg-utils \
28
- libu2f-udev \
29
- libvulkan1 \
30
- --no-install-recommends \
31
- && rm -rf /var/lib/apt/lists/*
32
-
33
- # Instalar Google Chrome
34
- RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg \
35
- && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
36
- && apt-get update \
37
- && apt-get install -y google-chrome-stable --no-install-recommends \
38
- && rm -rf /var/lib/apt/lists/*
39
-
40
- # Instalar ChromeDriver
41
- RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
42
- && DRIVER_VERSION=$(curl -s "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_$(echo $CHROME_VERSION | cut -d. -f1)") \
43
- && wget -q "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${DRIVER_VERSION}/linux64/chromedriver-linux64.zip" -O /tmp/chromedriver.zip \
44
- && unzip /tmp/chromedriver.zip -d /tmp/ \
45
- && mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver \
46
- && chmod +x /usr/local/bin/chromedriver \
47
- && rm -rf /tmp/chromedriver*
48
-
49
- # Criar diret贸rio de trabalho
50
- WORKDIR /app
51
-
52
- # Copiar requirements e instalar
53
- COPY requirements.txt .
54
- RUN pip install --no-cache-dir -r requirements.txt
55
-
56
- # Copiar c贸digo
57
- COPY . .
58
-
59
- # Criar pasta tempor谩ria para arquivos gerados
60
- RUN mkdir -p /app/temp_files
61
-
62
- # Expor porta
63
- EXPOSE 7860
64
-
65
- # Rodar o servidor
66
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
2
+
3
+ # Instalar depend锚ncias do sistema para Chrome
4
+ RUN apt-get update && apt-get install -y \
5
+ wget \
6
+ gnupg2 \
7
+ unzip \
8
+ curl \
9
+ fonts-liberation \
10
+ libasound2 \
11
+ libatk-bridge2.0-0 \
12
+ libatk1.0-0 \
13
+ libatspi2.0-0 \
14
+ libcups2 \
15
+ libdbus-1-3 \
16
+ libdrm2 \
17
+ libgbm1 \
18
+ libgtk-3-0 \
19
+ libnspr4 \
20
+ libnss3 \
21
+ libwayland-client0 \
22
+ libxcomposite1 \
23
+ libxdamage1 \
24
+ libxfixes3 \
25
+ libxkbcommon0 \
26
+ libxrandr2 \
27
+ xdg-utils \
28
+ libu2f-udev \
29
+ libvulkan1 \
30
+ --no-install-recommends \
31
+ && rm -rf /var/lib/apt/lists/*
32
+
33
+ # Instalar Google Chrome
34
+ RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg \
35
+ && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
36
+ && apt-get update \
37
+ && apt-get install -y google-chrome-stable --no-install-recommends \
38
+ && rm -rf /var/lib/apt/lists/*
39
+
40
+ # Instalar ChromeDriver
41
+ RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
42
+ && DRIVER_VERSION=$(curl -s "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_$(echo $CHROME_VERSION | cut -d. -f1)") \
43
+ && wget -q "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${DRIVER_VERSION}/linux64/chromedriver-linux64.zip" -O /tmp/chromedriver.zip \
44
+ && unzip /tmp/chromedriver.zip -d /tmp/ \
45
+ && mv /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver \
46
+ && chmod +x /usr/local/bin/chromedriver \
47
+ && rm -rf /tmp/chromedriver*
48
+
49
+ # Criar diret贸rio de trabalho
50
+ WORKDIR /app
51
+
52
+ # Copiar requirements e instalar
53
+ COPY requirements.txt .
54
+ RUN pip install --no-cache-dir -r requirements.txt
55
+
56
+ # Copiar c贸digo
57
+ COPY . .
58
+
59
+ # Criar pasta tempor谩ria para arquivos gerados
60
+ RUN mkdir -p /app/temp_files
61
+
62
+ # Expor porta
63
+ EXPOSE 7860
64
+
65
+ # Rodar o servidor
66
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]