J / Dockerfile
Skydata001's picture
Upload 5 files
7d6a5e2 verified
raw
history blame contribute delete
641 Bytes
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Set model cache directories
ENV U2NET_HOME=/app/models/u2net
ENV REMBG_CACHE=/app/models/rembg
ENV TRANSFORMERS_CACHE=/app/models/transformers
ENV HF_HOME=/app/models/hf
ENV HUGGINGFACE_HUB_CACHE=/app/models/hf
ENV OMP_NUM_THREADS=2
ENV OPENBLAS_NUM_THREADS=2
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Pre-down