mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-08-16 21:24:09 +00:00
33 lines
758 B
Docker
33 lines
758 B
Docker
FROM python:3.13.2-slim-bullseye
|
|
|
|
# Install minimal system dependencies and build tools for Python packages
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
gcc \
|
|
g++ \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy only requirements first to leverage Docker cache
|
|
COPY requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Remove build tools to reduce image size
|
|
RUN apt-get purge -y --auto-remove \
|
|
build-essential \
|
|
gcc \
|
|
g++
|
|
|
|
# Copy rest of the app code
|
|
COPY . .
|
|
|
|
# Create a non-root user for security reasons
|
|
RUN useradd -m appuser
|
|
USER appuser
|
|
|
|
# Run the Python application
|
|
CMD ["python", "sqs_processor.py"] |