Geoffrey Kip
Fix: Optimize dependencies to prevent Docker build timeout
5760cf7
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
# build-essential is often needed for compiling python packages
# git is needed if you install packages from git
RUN apt-get update && apt-get install -y \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Upgrade pip to ensure latest resolver
RUN pip install --upgrade pip
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . .
# Expose port 8501 for Streamlit
EXPOSE 8501
# Define environment variable for Streamlit to run in headless mode
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
# Run the application
CMD ["streamlit", "run", "ct_agent_app.py"]