ht-math-web-backend / Dockerfile
hoangthiencm's picture
Update Dockerfile
0a4a0fa verified
raw
history blame contribute delete
827 Bytes
FROM python:3.10-slim
WORKDIR /app
# --- Cài đặt system dependencies ---
# Pandoc: cho export Word
# Build tools: cho Python packages
# Image libraries: cho Pillow
# Tesseract OCR: Cho fallback khi Gemini chặn bản quyền
RUN apt-get update && \
apt-get install -y \
pandoc \
build-essential \
libfreetype6-dev \
libjpeg-dev \
zlib1g-dev \
tesseract-ocr \
tesseract-ocr-vie \
tesseract-ocr-eng \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip first
RUN pip install --upgrade pip setuptools wheel
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose port
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]