Spaces:
Sleeping
Sleeping
Commit
·
824df4a
1
Parent(s):
7742d11
Initial commit
Browse files- Dockerfile +58 -8
- app/clickloom_scrape.py → clickloom_scrape.py +0 -0
- app/main.py → main.py +0 -0
Dockerfile
CHANGED
|
@@ -1,3 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
@@ -34,16 +88,12 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 34 |
# Install Selenium and chromedriver-autoinstaller
|
| 35 |
RUN pip install --no-cache-dir selenium chromedriver-autoinstaller
|
| 36 |
|
| 37 |
-
# Copy
|
| 38 |
-
COPY
|
| 39 |
WORKDIR /app
|
| 40 |
|
| 41 |
# Expose FastAPI port
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
-
# Start FastAPI
|
| 45 |
-
CMD ["uvicorn", "
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
| 1 |
+
# FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
|
| 5 |
+
# # Install system dependencies
|
| 6 |
+
# RUN apt-get update && apt-get install -y \
|
| 7 |
+
# chromium-driver \
|
| 8 |
+
# chromium \
|
| 9 |
+
# libglib2.0-0 \
|
| 10 |
+
# libnss3 \
|
| 11 |
+
# libgconf-2-4 \
|
| 12 |
+
# libxss1 \
|
| 13 |
+
# libappindicator3-1 \
|
| 14 |
+
# libasound2 \
|
| 15 |
+
# libatk-bridge2.0-0 \
|
| 16 |
+
# libx11-xcb1 \
|
| 17 |
+
# libxcomposite1 \
|
| 18 |
+
# libxdamage1 \
|
| 19 |
+
# libxrandr2 \
|
| 20 |
+
# libgbm1 \
|
| 21 |
+
# libgtk-3-0 \
|
| 22 |
+
# xdg-utils \
|
| 23 |
+
# fonts-liberation \
|
| 24 |
+
# && apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 25 |
+
|
| 26 |
+
# # Set environment variable so Selenium uses Chromium
|
| 27 |
+
# ENV CHROME_BIN=/usr/bin/chromium
|
| 28 |
+
# ENV PATH="/usr/lib/chromium/:${PATH}"
|
| 29 |
+
|
| 30 |
+
# # Install Python dependencies
|
| 31 |
+
# COPY requirements.txt .
|
| 32 |
+
# RUN pip install --no-cache-dir -r requirements.txt
|
| 33 |
+
|
| 34 |
+
# # Install Selenium and chromedriver-autoinstaller
|
| 35 |
+
# RUN pip install --no-cache-dir selenium chromedriver-autoinstaller
|
| 36 |
+
|
| 37 |
+
# # Copy your FastAPI app
|
| 38 |
+
# COPY
|
| 39 |
+
# WORKDIR
|
| 40 |
+
|
| 41 |
+
# # Expose FastAPI port
|
| 42 |
+
# EXPOSE 7860
|
| 43 |
+
|
| 44 |
+
# # Start FastAPI
|
| 45 |
+
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
FROM python:3.10-slim
|
| 56 |
|
| 57 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
| 88 |
# Install Selenium and chromedriver-autoinstaller
|
| 89 |
RUN pip install --no-cache-dir selenium chromedriver-autoinstaller
|
| 90 |
|
| 91 |
+
# Copy the FastAPI app code (all files in root)
|
| 92 |
+
COPY . /app
|
| 93 |
WORKDIR /app
|
| 94 |
|
| 95 |
# Expose FastAPI port
|
| 96 |
EXPOSE 7860
|
| 97 |
|
| 98 |
+
# Start FastAPI (main.py is now in /app/main.py)
|
| 99 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
app/clickloom_scrape.py → clickloom_scrape.py
RENAMED
|
File without changes
|
app/main.py → main.py
RENAMED
|
File without changes
|