Agent_Crop_M / Dockerfile
vignesh-skanda's picture
Add full source, HuggingFace Spaces deployment config
be1d554
Raw
History Blame Contribute Delete
634 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system deps
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 libsm6 libxrender1 libxext6 git \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python deps first (layer cache)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source
COPY pyproject.toml .
COPY src/ src/
COPY app.py .
# Install the package
RUN pip install --no-cache-dir -e .
# HF Spaces runs as non-root user 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
EXPOSE 7860
CMD ["python", "app.py"]