QuantIQ / Dockerfile
Karan6124's picture
fix(docker): migrate legacy redpanda setup script URL to linux.pkg.redpanda.com
7e086ee
Raw History Blame Contribute Delete
1.36 kB
FROM python:3.12-slim-bookworm
# Force stdout/stderr to be unbuffered to enable live streaming logs in Docker
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Install system dependencies, Redis, supervisor, and curl
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
gnupg \
redis-server \
supervisor \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Redpanda
RUN curl -1sLf 'https://linux.pkg.redpanda.com/setup-redpanda.deb.sh' | bash \
&& apt-get install -y --no-install-recommends redpanda \
&& rm -rf /var/lib/apt/lists/*
# Install uv for rapid Python packaging
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Set working directory
WORKDIR /workspace
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install dependencies using uv
RUN uv sync --frozen
# Copy the rest of the application code
COPY backend ./backend
COPY worker ./worker
# Copy model.onnx if it exists (falls back to downloading from HF Hub if not present)
COPY Dockerfile model.onnx* ./
# Copy supervisord configuration
COPY backend/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose ports for API, Redpanda, and Redis
EXPOSE 7860 9092 6379
# Run supervisord to start all services
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]