Spaces:
Sleeping
Sleeping
File size: 835 Bytes
67f4ecf f705fe2 67f4ecf 212cdbf 67f4ecf d72f50c | 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 | FROM python:3.10-slim
WORKDIR /app
# Install system dependencies for OpenCV
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download the MediaPipe model file
RUN wget -q -O hand_landmarker.task https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/latest/hand_landmarker.task
# Copy the application code
COPY . .
# Expose the port Streamlit runs on (HF Spaces uses 7860)
EXPOSE 7860
# Run the application
CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0", "--server.enableCORS", "false", "--server.enableXsrfProtection", "false"]
|