CoolFace
Apppublic

shreshthvig/background-remover

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile39 linesDownload Raw Back to root
1# Use Python 3.12.1 slim image2FROM python:3.12.1-slim3 4# Set working directory5WORKDIR /app6 7# Install system dependencies (including Pillow deps)8RUN apt-get update && apt-get install -y \9    build-essential \10    curl \11    git \12    libjpeg-dev \13    zlib1g-dev \14    libpng-dev \15    libtiff-dev \16    libfreetype6-dev \17    && rm -rf /var/lib/apt/lists/*18 19# Copy requirements20COPY requirements.txt ./21 22# Install Python dependencies23RUN pip install --upgrade pip24RUN pip install -r requirements.txt25 26# Copy your app and images27COPY src/ ./src/28 29# Expose the port for Streamlit30EXPOSE 808031 32# Optional healthcheck33HEALTHCHECK CMD curl --fail http://localhost:8080/_stcore/health || exit 134 35# Entry point: disable XSRF protection for Hugging Face36ENTRYPOINT ["streamlit", "run", "./src/streamlit_app.py", "--server.port=8080", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]37 38 39