Download Dockerfile from txtorg/str: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/txtorg/str/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/txtorg/str/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/txtorg/str/resolve/main/Dockerfile
1.05 kB
| FROM node:20-slim | |
| # Install ffmpeg + git + python (for yt-dlp) | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| git \ | |
| curl \ | |
| ca-certificates \ | |
| python3 \ | |
| python3-pip \ | |
| python3-venv \ | |
| fonts-dejavu-core \ | |
| fonts-liberation \ | |
| fonts-freefont-ttf \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # yt-dlp + curl_cffi (Cloudflare impersonation) in an isolated venv, | |
| # put on PATH so server_60.js can call `yt-dlp` directly | |
| RUN python3 -m venv /opt/venv \ | |
| && /opt/venv/bin/pip install --no-cache-dir "yt-dlp[default]" curl_cffi | |
| ENV PATH="/opt/venv/bin:${PATH}" | |
| # Fail the build early if yt-dlp or impersonation isn't available | |
| RUN yt-dlp --version && yt-dlp --list-impersonate-targets | head -n 5 | |
| WORKDIR /app | |
| # Install runtime dependencies | |
| RUN npm install axios express cors dotenv | |
| # Create streams directory | |
| RUN mkdir -p /app/streams | |
| # Copy startup script | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| # Ensure /app has full permissions | |
| RUN chmod -R 777 /app | |
| EXPOSE 7860 | |
| CMD ["/start.sh"] | |