File size: 1,086 Bytes
805fa80 869d071 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# π Nova AI Docker Image
FROM python:3.9-slim
# π Metadata
LABEL maintainer="Teknova <teknova@example.com>"
LABEL description="Teknova Nova AI - ΓzgΓΌn yapay zeka teknolojisi"
LABEL version="1.0.0"
# π§ Environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
# π Working directory
WORKDIR /app
# π§ System dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# π¦ Copy requirements first (for better caching)
COPY requirements.txt .
# π Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# π Copy application code
COPY . .
# π€ Create non-root user
RUN useradd -m -u 1000 novaai && chown -R novaai:novaai /app
USER novaai
# π Expose port
EXPOSE 8000
# π Health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/ || exit 1
# π Run application
CMD ["python", "app.py"] |