FROM python:3.10-slim # Set a writable working directory WORKDIR /home/user/app # Install system dependencies RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* # Create .chainlit, .files, and other folders needed by Chainlit RUN mkdir -p /home/user/app/.chainlit /home/user/app/.files && chmod -R 777 /home/user/app # Set optional Chainlit envs ENV CHAINLIT_PROJECT_ROOT=/home/user/app ENV CHAINLIT_FILES_PATH=/home/user/app/.files # Copy dependency list and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy your chatbot code COPY app.py . # Expose port for Chainlit EXPOSE 7860 # Run Chainlit CMD ["chainlit", "run", "app.py", "--port", "7860", "--host", "0.0.0.0"]