Nechba's picture
Update Dockerfile
942cdfc verified
raw
history blame
621 Bytes
FROM python:3.9-slim
# Install system dependencies (poppler-utils for pdf2image)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
poppler-utils \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy requirements first (for better caching)
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the app
COPY --chown=user . .
# Run Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]