# Use an official lightweight Python image FROM python:3.11-slim # Set the working directory to /app WORKDIR /app # Prevent interactive prompts during apt-get ENV DEBIAN_FRONTEND=noninteractive # Install curl, then use it to install the official Node.js 20.x, avoiding timezone hangs RUN apt-get update && apt-get install -y curl && \ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get install -y nodejs && \ rm -rf /var/lib/apt/lists/* # Copy the requirements file and install dependencies COPY requirements.txt . # Install the Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy all the remaining files to the working directory COPY . . # Expose port 7860 and run the FastAPI app EXPOSE 7860 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]