FROM python:latest # Add user RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # Set default to user's home directory WORKDIR $HOME/app # Copy current files to space COPY . $HOME/app # Install system dependencies and requirements RUN apt-get update && \ xargs -r -a /app/packages.txt apt-get install -y && \ rm -rf /var/lib/apt/lists/* && \ pip install --no-cache-dir -r $HOME/app/requirements.txt && \ pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu EXPOSE 7860 CMD streamlit run app.py \ --server.headless true \ --server.enableCORS false \ --server.enableXsrfProtection false \ --server.fileWatcherType none \