Update Dockerfile
Browse files- Dockerfile +38 -39
Dockerfile
CHANGED
|
@@ -1,39 +1,38 @@
|
|
| 1 |
-
# Use official Python image
|
| 2 |
-
FROM python:3.11-slim
|
| 3 |
-
|
| 4 |
-
# Set work directory
|
| 5 |
-
WORKDIR /app
|
| 6 |
-
|
| 7 |
-
# Install system dependencies
|
| 8 |
-
RUN apt-get update && apt-get install -y \
|
| 9 |
-
build-essential \
|
| 10 |
-
libglib2.0-0 \
|
| 11 |
-
libnss3 \
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
pip install --no-cache-dir
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
| 1 |
+
# Use official Python image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set work directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
build-essential \
|
| 10 |
+
libglib2.0-0 \
|
| 11 |
+
libnss3 \
|
| 12 |
+
libfontconfig1 \
|
| 13 |
+
libxss1 \
|
| 14 |
+
libasound2 \
|
| 15 |
+
libatk1.0-0 \
|
| 16 |
+
libatk-bridge2.0-0 \
|
| 17 |
+
libcups2 \
|
| 18 |
+
libdrm2 \
|
| 19 |
+
libxcomposite1 \
|
| 20 |
+
libxdamage1 \
|
| 21 |
+
libxrandr2 \
|
| 22 |
+
libgbm1 \
|
| 23 |
+
wget \
|
| 24 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 25 |
+
|
| 26 |
+
# Copy project files
|
| 27 |
+
COPY . /app
|
| 28 |
+
|
| 29 |
+
# Install Python dependencies
|
| 30 |
+
RUN pip install --upgrade pip && \
|
| 31 |
+
pip install --no-cache-dir . && \
|
| 32 |
+
pip install --no-cache-dir fastapi uvicorn[standard] patchright markdownify beautifulsoup4 readability-lxml ddgs
|
| 33 |
+
|
| 34 |
+
# Expose port
|
| 35 |
+
EXPOSE 8000
|
| 36 |
+
|
| 37 |
+
# Run the FastAPI server
|
| 38 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|