File size: 759 Bytes
bb386a0 726cc73 bb386a0 726cc73 9766e10 bb386a0 185a1ab bb386a0 82474ae 726cc73 bb386a0 9766e10 bb386a0 726cc73 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | FROM python:3.11-slim AS builder
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt && \
opentelemetry-bootstrap -a install
RUN mkdir -p /outputs/bert \
/outputs/ml \
/outputs/mlp \
/outputs/lstm \
/outputs/transformer
COPY outputs/bert/label_encoder.pkl ./outputs/bert/
COPY outputs/lstm ./outputs/lstm
COPY outputs/ml ./outputs/ml
COPY outputs/mlp ./outputs/mlp
COPY app ./app
COPY start.sh .
RUN useradd -m appuser && \
chown -R appuser:appuser /usr/src/app && \
chmod +x start.sh
USER appuser
CMD ["./start.sh"] |