Files
realesrgan-api/Dockerfile
Developer 706e6c431d
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m35s
feat: remove GPU support and simplify to CPU-only architecture
2026-02-19 12:41:13 +01:00

34 lines
866 B
Docker

# ---- Base Stage ----
FROM python:3.11-slim AS base
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl libgl1 libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt \
&& rm /tmp/requirements*.txt
# ---- Final Stage ----
FROM base AS final
WORKDIR /app
# Copy application code
COPY app/ /app/app/
# Create data directories
RUN mkdir -p /data/uploads /data/outputs /data/models /data/temp /data/jobs
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:8000/api/v1/health || exit 1
# Expose port
EXPOSE 8000
# Run API
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]