generated from shaloy-lewis/ds_template_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (23 loc) · 864 Bytes
/
Dockerfile
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
FROM python:3.12.4-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements.txt file
COPY ./requirements.txt /app/requirements.txt
# Upgrade pip and install the dependencies
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir --upgrade -r /app/requirements.txt
# Copy the application files
COPY ./api.py /app/api.py
COPY ./init_setup.sh /app/init_setup.sh
COPY ./src /app/src
COPY ./artifacts/model.pkl /app/artifacts/model.pkl
COPY ./artifacts/preprocessor.pkl /app/artifacts/preprocessor.pkl
COPY ./artifacts/outlier_threshold.json /app/artifacts/outlier_threshold.json
WORKDIR /app
# Set up the command to run the application
CMD ["sh", "init_setup.sh"]