File size: 751 Bytes
e1ef3ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Stage 1: Build
FROM python:3.11-slim as builder

WORKDIR /app

# Install git and unzip
RUN apt-get update && \
    apt-get install -y --no-install-recommends git unzip && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Clone the public repository
RUN git clone https://github.com/exis000/HeartDiseasePredictor_Model.git /app/HeartDiseasePredictor_Model

# Set the working directory to the cloned repository
WORKDIR /app/HeartDiseasePredictor_Model

# Install Python dependencies
RUN pip install --upgrade pip && \
    pip install -r requirements.txt

# Extract the RandomForest_best_model.zip file in the model folder
RUN unzip model/RandomForest_best_model.zip -d model/

# Run the main script
CMD ["python", "-m", "deployment.api.app"]