File size: 947 Bytes
5ac59c8
46335ce
 
 
 
 
 
 
 
 
 
9a87c4e
 
6abc080
 
9a87c4e
6b18b7c
46335ce
 
6b18b7c
3a66698
6b18b7c
89044b7
46335ce
6b18b7c
 
 
 
 
 
 
866ac02
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
33
FROM continuumio/miniconda3:latest

WORKDIR /app

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

ENV HOME=/tmp
ENV STREAMLIT_HOME=/tmp
ENV MPLCONFIGDIR=/tmp/mpl_cache
RUN mkdir -p /tmp/mpl_cache

COPY requirements.txt ./
COPY src/ ./src/

# Create environment and install dependencies
RUN conda create -n appenv python=3.12.9 -y
RUN conda run -n appenv conda install --file requirements.txt -y
RUN conda run -n appenv pip install scikit-learn opencv-python-headless streamlit-webrtc matplotlib huggingface-hub twilio

# Expose Streamlit port
EXPOSE 8501

# Healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1

# Set entrypoint using conda run
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "appenv", "streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]