hostbot / Dockerfile
j49_c
Fix: Delay keep-alive and lazy-load AI to ensure stable boot on HF
cc7654a
Raw History Blame Contribute Delete
554 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
gcc \
python3-dev \
dnsutils \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . .
ENV SERVER_PORT=7860
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
EXPOSE 7860
# Healthcheck removed to prevent early restarts
CMD ["python", "app.py"]