File size: 1,381 Bytes
20995cd 234c3f9 4144c35 ccbc9d9 4144c35 ccbc9d9 5c464af 20995cd 4144c35 20995cd 234c3f9 4144c35 20995cd 4144c35 ccbc9d9 20995cd 3cc78a4 234c3f9 3cc78a4 20995cd 4144c35 20995cd | 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 31 32 33 34 35 36 37 38 39 40 41 42 | FROM python:3.11-slim
# ffmpeg does the TS -> fragmented MP4 remux on /stream. ca-certificates for
# HTTPS. There is deliberately no Chromium and no nodejs: the browser for
# streamlink's Kick challenge path is Lightpanda, installed by pip from
# requirements.txt because that wheel bundles the binary itself.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app \
PIP_NO_CACHE_DIR=1 \
LOG_LEVEL=INFO \
# Lightpanda sends usage telemetry by default; this Space does not opt in
# (https://lightpanda.io/privacy-policy).
LIGHTPANDA_DISABLE_TELEMETRY=true
WORKDIR /app
COPY requirements.txt .
# streamlink moves fast and its Kick plugin tracks site changes, so it is
# installed fresh rather than pinned.
RUN pip install --no-cache-dir -U pip \
&& pip install --no-cache-dir -U -r requirements.txt
COPY app.py /app/app.py
COPY core /app/core
COPY solutions /app/solutions
# cdn/ is the client-side resolution endpoint (GET /cdn/formats). It reads
# Kick's listing and the HLS manifest and returns CDN coordinates so a browser
# can pull the video itself. It never downloads video.
COPY cdn /app/cdn
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|