CoolFace
Apppublic

AstraSunday/geminicli2api

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
Dockerfile38 linesDownload Raw Back to root
1FROM python:3.11-slim2 3# Set working directory4WORKDIR /app5 6# Install system dependencies7RUN apt-get update && apt-get install -y \8    gcc \9    curl \10    && rm -rf /var/lib/apt/lists/*11 12# Copy requirements first for better caching13COPY requirements.txt .14 15# Install Python dependencies16RUN pip install --no-cache-dir -r requirements.txt17 18# Copy application code19COPY . .20 21# Create non-root user for security22RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app23USER appuser24 25# Expose ports (8888 for compatibility, 7860 for Hugging Face)26EXPOSE 8888 786027 28# Set environment variables29ENV PYTHONPATH=/app30ENV HOST=0.0.0.031ENV PORT=786032 33# Health check (use PORT environment variable)34HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \35    CMD curl -f http://localhost:${PORT}/health || exit 136 37# Run the application using app.py (Hugging Face compatible entry point)38CMD ["python", "app.py"]