40 lines
993 B
Docker
40 lines
993 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./Docker/requirements.txt .
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
curl \
|
|
protobuf-compiler \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY ./Docker/protos ./protos
|
|
COPY ./Docker/src ./src
|
|
|
|
RUN python -m grpc_tools.protoc \
|
|
--proto_path=./protos \
|
|
--python_out=./src \
|
|
--grpc_python_out=./src \
|
|
./protos/brunix.proto
|
|
|
|
# Classifier retraining pipeline (ADR-0010)
|
|
RUN mkdir -p /app/scripts/pipelines/classifier
|
|
COPY ./scripts/pipelines/classifier/retrain_pipeline.py /app/scripts/pipelines/classifier/
|
|
COPY ./scripts/pipelines/classifier/seed_classifier_dataset.jsonl /app/scripts/pipelines/classifier/
|
|
|
|
COPY ./Docker/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 50051
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|