Download Dockerfile from afluakd9/Video-downloader-CPU-basic: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/spaces/afluakd9/Video-downloader-CPU-basic/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/afluakd9/Video-downloader-CPU-basic/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/afluakd9/Video-downloader-CPU-basic/resolve/main/Dockerfile
1.94 kB
| FROM aiogram/telegram-bot-api:latest | |
| USER root | |
| RUN apk update && apk add --no-cache python3 py3-pip ffmpeg bash | |
| WORKDIR /app | |
| COPY . /app/ | |
| RUN mkdir -p /app/downloads /app/telegram-bot-api-data | |
| RUN chown -R 1000:1000 /app | |
| # ഇൻസ്റ്റാഗ്രാം ലിങ്കുകളിലെ ട്രാക്കിംഗ് കോഡ് (?stkn=) ഓട്ടോമാറ്റിക് ആയി ക്ലീൻ ചെയ്യാൻ ബോട്ടിന്റെ കോഡിൽ മാറ്റം വരുത്തുന്നു | |
| RUN sed -i 's/url = message.text/url = message.text.split("?")[0]/g' bot/bot.py || true | |
| RUN sed -i 's/url = update.message.text/url = update.message.text.split("?")[0]/g' bot/bot.py || true | |
| # യൂട്യൂബ്, ഇൻസ്റ്റാഗ്രാം എന്നിവയ്ക്കുള്ള ബൈപാസ് സെറ്റിംഗ്സ് | |
| RUN mkdir -p /etc && \ | |
| echo '--force-ipv4' >> /etc/yt-dlp.conf && \ | |
| echo '--geo-bypass' >> /etc/yt-dlp.conf && \ | |
| echo '--extractor-args "instagram:client=android"' >> /etc/yt-dlp.conf && \ | |
| echo '--extractor-args "youtube:player_client=android,web"' >> /etc/yt-dlp.conf | |
| RUN pip3 install --no-cache-dir --break-system-packages flask -U https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz || pip3 install --no-cache-dir flask -U https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz | |
| RUN pip3 install --no-cache-dir --break-system-packages -r bot/requirements.txt || pip3 install --no-cache-dir -r bot/requirements.txt | |
| USER 1000 | |
| EXPOSE 7860 | |
| ENTRYPOINT [] | |
| CMD bash -c "telegram-bot-api --local --api-id=${TELEGRAM_API_ID} --api-hash=${TELEGRAM_API_HASH} --dir=/app/telegram-bot-api-data --http-port=8081 & python3 -m http.server 7860 & cd reclip && python3 app.py & sleep 10 && cd /app/bot && RECLIP_URL=http://localhost:8899 DOWNLOADS_PATH=/app/downloads TELEGRAM_BOT_API_URL=http://127.0.0.1:8081 python3 bot.py" | |