PDFTools / Dockerfile
errantanomie's picture
Update Dockerfile
996f757 verified
raw
history blame contribute delete
582 Bytes
FROM python:3.10
# Install Poppler
RUN apt-get update && apt-get install -y poppler-utils
# Verify Poppler installation and show exact path of pdfinfo
RUN which pdfinfo && pdfinfo -version
# Debug - try and find the location of pdfinfo
RUN find / -name "pdfinfo"
# Ensure Poppler is in PATH
ENV PATH="/usr/local/bin:/usr/bin:${PATH}"
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . /app
# Expose the port
EXPOSE 7860
# Run the app
CMD ["python", "app.py"]