Download Dockerfile from SilentWraith/HeartDiseasePredictor_Model: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/spaces/SilentWraith/HeartDiseasePredictor_Model/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SilentWraith/HeartDiseasePredictor_Model/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SilentWraith/HeartDiseasePredictor_Model/resolve/main/Dockerfile
1.12 kB
| # Stage 1: Build | |
| FROM python:3.11-slim as builder | |
| WORKDIR /app | |
| # Install git and wget | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends git wget && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Clone the public repository and checkout the patch-1 branch | |
| RUN git clone -b patch-1 https://github.com/zawsq/HeartDiseasePredictor_Model.git /app/HeartDiseasePredictor_Model | |
| # Set the working directory to the cloned repository | |
| WORKDIR /app/HeartDiseasePredictor_Model | |
| # Download the model file from Hugging Face into the existing "model" folder | |
| RUN wget -O /app/HeartDiseasePredictor_Model/model/RandomForest_best_model.pkl \ | |
| https://huggingface.co/exis0705/heart_disease_predictor_model/resolve/main/RandomForest_best_model.pkl | |
| # Set PYTHONPATH to include the root directory of the project | |
| ENV PYTHONPATH=/app/HeartDiseasePredictor_Model | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip && \ | |
| pip install -r requirements.txt | |
| # Change to the deployment/Api directory and run the app | |
| WORKDIR /app/HeartDiseasePredictor_Model/deployment/Api | |
| CMD ["python", "app.py"] |