File size: 1,038 Bytes
a1a7d89 |
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 |
FROM python:3.12-slim
ARG WORKDIR=/app
WORKDIR $WORKDIR
RUN python -m pip install --upgrade pip==23.3.1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential && \
rm -rf /var/lib/apt/lists/*
COPY product_return_prediction $WORKDIR/product_return_prediction
# COPY product_return_prediction/api.py $WORKDIR/product_return_prediction
# COPY product_return_prediction/config.py $WORKDIR/product_return_prediction
# COPY product_return_prediction/dataset.py $WORKDIR/product_return_prediction
# COPY product_return_prediction/features.py $WORKDIR/product_return_prediction
COPY README.md $WORKDIR/
COPY requirements.txt $WORKDIR/
COPY pyproject.toml $WORKDIR/
COPY data/external/inventory.tsv $WORKDIR/data/external/
COPY models/scaler.pkl $WORKDIR/models/
COPY models/svm.pkl $WORKDIR/models/
RUN pip install --no-cache-dir -r requirements.txt
# RUN pip install --no-cache-dir .
EXPOSE 7860
CMD ["uvicorn", "product_return_prediction.api:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|