Spaces:
Sleeping
Sleeping
Cyber Catalyst Team
Implement PPID orphan watchdog, tini zombie reaping, connection pooling caps, point-in-time zip snapshots, and db keep-alive heartbeats
8d7c6d3 | FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git bash curl tini && \ | |
| 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 | |
| COPY --chown=user backend.py . | |
| # Create workspace directory | |
| RUN mkdir -p /tmp/workspace | |
| EXPOSE 7860 | |
| ENTRYPOINT ["tini", "--"] | |
| CMD ["python", "backend.py"] | |