File size: 717 Bytes
da93542
 
 
 
12ab90a
da93542
 
 
 
 
 
 
 
 
 
 
 
 
 
12ab90a
 
da93542
 
 
 
 
 
8d7c6d3
da93542
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
FROM python:3.11-slim

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    git bash curl tini build-essential zip unzip && \
    rm -rf /var/lib/apt/lists/*

# Create non-root user (HF requirement: uid 1000)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

# Install Python dependencies
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt

# Copy application (including second_brain, watchdog, helix, swarm)
COPY --chown=user . .

# Create workspace directory
RUN mkdir -p /tmp/workspace

EXPOSE 7860

ENTRYPOINT ["tini", "--"]
CMD ["python", "backend.py"]