Spaces:
Sleeping
Sleeping
File size: 969 Bytes
96916ac 496fb01 e5fb9a9 353cb5a e5fb9a9 496fb01 | 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 34 35 36 37 38 39 40 41 42 43 44 45 | FROM python:3.11-slim
WORKDIR /app
# Install system dependencies required for OpenCV and MediaPipe
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
libgl1 \
libglib2.0-0 \
ffmpeg \
libglx-mesa0 \
&& rm -rf /var/lib/apt/lists/*
# Set Streamlit configuration
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Copy requirements and install Python dependencies
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application files
COPY streamlit_app.py ./
COPY classifier.tflite ./
# Copy optional images folder if it exists
COPY images/ ./images/
# Expose Streamlit port
EXPOSE 8501
# Health check
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# Run the Streamlit app
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|