# Base image FROM python:3.10-slim # Avoid interactive prompts ENV DEBIAN_FRONTEND=noninteractive # System deps (for building Python + Rust crates) RUN apt-get update && apt-get install -y \ curl \ build-essential \ default-jre \ default-jre-headless \ default-jdk \ default-jdk-headless \ debianutils \ git \ openssl \ libssl-dev \ pkg-config \ && rm -rf /var/lib/apt/lists/* # Install Rust (latest stable via rustup) RUN curl https://sh.rustup.rs -sSf | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" # Verify versions (optional but useful for logs) RUN rustc --version && cargo --version # Set workdir WORKDIR /app # Copy dependency files first (for caching) COPY requirements.txt . # Install Python deps RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the app COPY . . # Expose port (HF expects 7860) EXPOSE 7860 # Run the app CMD ["python", "app.py"]