InsightPilotAI / Dockerfile
Kiruthikaramalingam's picture
Update Dockerfile
6c920e3 verified
raw
history blame contribute delete
834 Bytes
# βœ… Use Python 3.11 (ensures compatibility with pysqlite3)
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
# Add a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy and install dependencies
COPY --chown=user requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# πŸ‘‰ Fix sqlite issue by installing pysqlite3-binary
RUN pip install pysqlite3-binary==0.5.2
# Copy the entire app
COPY --chown=user . /app
# Expose the port (required by HF)
EXPOSE 7860
# Run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]