FROM python:3.10 # Set environment to non-interactive (avoids tzdata prompts) ENV DEBIAN_FRONTEND=noninteractive # Update packages and install dependencies for Rust RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ build-essential \ pkg-config \ libffi-dev \ libssl-dev \ ca-certificates \ git \ && rm -rf /var/lib/apt/lists/* # Install Rust (via official rustup script) RUN curl https://sh.rustup.rs -sSf | bash -s -- -y # Add Rust to PATH ENV PATH="/root/.cargo/bin:$PATH" # Set working directory WORKDIR /app # Copy your files COPY . /app ENV TMPDIR=/app/tmp RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache RUN chmod -R 777 /app # Confirm versions RUN rustc --version && cargo --version # Optional: install Python deps RUN python3 -m pip install -r requirements.txt EXPOSE 7860 CMD [ "python", "app.py" ]