dealflow-ai / Dockerfile
PeterBot22's picture
fix: switch to Docker SDK for full build control
b81fb8e verified
raw
history blame contribute delete
635 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for layer caching
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy app
COPY . .
# HF Spaces runs as user 1000
RUN useradd -m -u 1000 user
RUN chown -R user:user /app
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONPATH=/app
EXPOSE 7860
CMD ["python", "app.py"]