kiwi/Dockerfile
pyr0ball 79f345aae6
Some checks failed
CI / Backend (Python) (push) Has been cancelled
CI / Frontend (Vue) (push) Has been cancelled
Mirror / mirror (push) Has been cancelled
fix: install circuitforge-orch in kiwi image for cf-orch-agent sidecar
cf-orch-agent in compose.override.yml was crash-looping (exit 127) because
the circuitforge_orch package wasn't installed in the kiwi conda env.
Same COPY + editable-install pattern already used for circuitforge-core.
2026-04-18 22:29:08 -07:00

36 lines
1.4 KiB
Docker

FROM continuumio/miniconda3:latest
WORKDIR /app
# Install system dependencies for OpenCV + pyzbar
RUN apt-get update && apt-get install -y --no-install-recommends \
libzbar0 libgl1 libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install circuitforge-core from sibling directory (compose sets context: ..)
COPY circuitforge-core/ ./circuitforge-core/
RUN conda run -n base pip install --no-cache-dir -e ./circuitforge-core
# Install circuitforge-orch — needed for the cf-orch-agent sidecar (compose.override.yml)
COPY circuitforge-orch/ ./circuitforge-orch/
# Create kiwi conda env and install app
COPY kiwi/environment.yml .
RUN conda env create -f environment.yml
COPY kiwi/ ./kiwi/
# Remove gitignored config files that may exist locally — defense-in-depth.
# The parent .dockerignore should exclude these, but an explicit rm guarantees
# they never end up in the cloud image regardless of .dockerignore placement.
RUN rm -f /app/kiwi/.env
# Install cf-core and cf-orch into the kiwi env BEFORE installing kiwi
RUN conda run -n kiwi pip install --no-cache-dir -e /app/circuitforge-core
RUN conda run -n kiwi pip install --no-cache-dir -e /app/circuitforge-orch
WORKDIR /app/kiwi
RUN conda run -n kiwi pip install --no-cache-dir -e .
EXPOSE 8512
CMD ["conda", "run", "--no-capture-output", "-n", "kiwi", \
"uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8512"]