ConPDFApi / Dockerfile
um41r's picture
Update Dockerfile
d0f9c4f verified
raw
history blame contribute delete
678 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies for OpenCV and pdf2docx
RUN apt-get update && apt-get install -y \
build-essential \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libgomp1 \
libxcb1 \
libgcc-s1 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY main.py .
# Create temp directory
RUN mkdir -p /tmp/conversions
# Expose port
EXPOSE 7860
# Set environment variable for Hugging Face Spaces
ENV PORT=7860
# Run the application
CMD ["python", "main.py"]