Spaces:
Runtime error
Runtime error
File size: 900 Bytes
258dc13 e924bea 258dc13 e924bea 258dc13 e924bea 258dc13 e924bea 258dc13 e924bea 258dc13 e924bea 258dc13 e924bea 258dc13 e924bea 258dc13 | 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 | # Stable Python version compatible with ML libraries
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Prevent Python from writing pyc files & enable logs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies (important for numpy, tensorflow, opencv, etc.)
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip (important for tensorflow installs)
RUN pip install --no-cache-dir --upgrade pip
# Copy only requirements first (better caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY src/ ./src/
# Expose Streamlit default port
EXPOSE 8501
# Run Streamlit app
CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"] |