# Use official Python base image FROM python:3.10-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Create app directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install Python packages COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the code COPY . . # Make everything in /app world-writable RUN chmod -R 777 /app # Ensure /tmp is writable too (common scratch space) RUN chmod -R 777 /tmp # Default command to run the script (change as needed) EXPOSE 8000 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]