# ---------------------------------------------------------------------- # Stage 1: Build Stage # ---------------------------------------------------------------------- FROM python:3.12-slim AS builder RUN apt-get update && apt-get install -y --no-install-recommends \ bash \ git \ build-essential \ libffi-dev \ libssl-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /app RUN git clone https://github.com/weebzone/Surf-TG /app RUN pip install -U pip uv RUN uv pip install --system --no-cache-dir -r requirements.txt # ---------------------------------------------------------------------- # Stage 2: Final Stage # ---------------------------------------------------------------------- FROM python:3.12-slim RUN apt-get update && apt-get install -y --no-install-recommends bash git ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages COPY --from=builder /app /app ENV PORT=7860 ENV BASE_URL=https://lbp007-123.hf.space EXPOSE 7860 CMD ["bash", "surf-tg.sh"]