FROM python:3.10-slim # Set working directory WORKDIR /app # Install system dependencies (for shell commands) RUN apt-get update && apt-get install -y \ git \ curl \ wget \ iputils-ping \ net-tools \ vim \ && rm -rf /var/lib/apt/lists/* # Copy requirements (minimal) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy source code COPY src/ src/ COPY node-config.yml . COPY demo/ demo/ # Create a non-root user for security (optional, but good practice) # Add cache busting ARG CACHEBUST=20251128-FORCE-REBUILD RUN useradd -m -u 1000 user RUN chown -R user:user /app USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH \ PYTHONPATH=/app # Switch to user for running the service USER user # Make /app writable by user for demo file creation USER root RUN chown -R user:user /app USER user # Expose port EXPOSE 7860 # Run the node server CMD ["python", "-m", "src.nacc_node.cli", "serve", "--host", "0.0.0.0", "--port", "7860"]