| FROM python:3.11-slim |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| build-essential \ |
| curl \ |
| git \ |
| unzip \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY requirements.txt ./ |
| COPY app.py ./ |
| COPY cell_images.zip ./ |
| COPY extract.py ./ |
| COPY start.sh ./ |
| COPY malaria_svm_hog_model.joblib ./ |
| COPY label_encoder.joblib ./ |
| COPY examples/ ./examples/ |
|
|
| |
| ENV STREAMLIT_HOME=/app/.streamlit |
| ENV MPLCONFIGDIR=/app/.config/matplotlib |
| ENV HOME=/app |
|
|
| RUN mkdir -p /app/.streamlit /app/.config/matplotlib |
| RUN pip install --no-cache-dir -r requirements.txt |
| RUN chmod +x start.sh |
|
|
| |
| RUN chmod -R 777 /app |
|
|
| EXPOSE 8501 |
|
|
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1 |
|
|
| ENTRYPOINT ["./start.sh"] |