Commit
·
7ecf408
1
Parent(s):
1fe01f1
Add Dockerfile and update README for Docker support
Browse filesIntroduces a Dockerfile for containerized deployment using Python 3.11 and required system dependencies. Updates the README to reflect Docker usage, specifying the app port and removing Gradio-specific SDK and Python version fields.
- Dockerfile +39 -0
- README.md +2 -4
Dockerfile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.11 (more compatible than 3.13 for many packages)
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies for document processing
|
| 8 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
+
tesseract-ocr \
|
| 10 |
+
libgl1-mesa-glx \
|
| 11 |
+
libglib2.0-0 \
|
| 12 |
+
curl \
|
| 13 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
+
|
| 15 |
+
# Install uv for fast dependency resolution
|
| 16 |
+
RUN pip install uv
|
| 17 |
+
|
| 18 |
+
# Copy requirements first for better caching
|
| 19 |
+
COPY requirements.txt .
|
| 20 |
+
|
| 21 |
+
# Install Python dependencies with uv
|
| 22 |
+
# Using --system to install into the system Python (not a venv)
|
| 23 |
+
RUN uv pip install --system --no-cache -r requirements.txt
|
| 24 |
+
|
| 25 |
+
# Copy application code
|
| 26 |
+
COPY . .
|
| 27 |
+
|
| 28 |
+
# Create reports directory
|
| 29 |
+
RUN mkdir -p reports
|
| 30 |
+
|
| 31 |
+
# Expose Gradio default port
|
| 32 |
+
EXPOSE 7860
|
| 33 |
+
|
| 34 |
+
# Set environment variables for Gradio
|
| 35 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 36 |
+
ENV GRADIO_SERVER_PORT="7860"
|
| 37 |
+
|
| 38 |
+
# Run the application
|
| 39 |
+
CMD ["python", "gradio_demo.py"]
|
README.md
CHANGED
|
@@ -3,11 +3,9 @@ title: Consulting Assistant
|
|
| 3 |
emoji: 🤓
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: gray
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
app_file: gradio_demo.py
|
| 9 |
pinned: false
|
| 10 |
-
python_version: "3.13.9"
|
| 11 |
---
|
| 12 |
|
| 13 |
license: mit <br>
|
|
|
|
| 3 |
emoji: 🤓
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: gray
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
|
|
|
| 8 |
pinned: false
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
license: mit <br>
|