FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ python3-dev \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY handler.py . COPY app.py . # Set environment variables ENV PYTHONUNBUFFERED=1 # Run the application CMD ["python", "-c", "import app"]