FROM python:3.9 WORKDIR /app # Copy requirements and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the application files COPY . . # Create necessary directories and set permissions RUN mkdir -p /app/.chainlit && chmod 777 /app/.chainlit # Set the user to run the app USER 1000 # Command to run the application CMD ["chainlit", "run", "app.py", "--port", "7860"]