Spaces:
No application file
No application file
Download Dockerfile_subprocess from Enutrof/TheCollector: direct link, hf CLI and curl.
- Browser
- Download file 1.86 kB
-
https://huggingface.co/spaces/Enutrof/TheCollector/resolve/main/Dockerfile_subprocess
- Command line
-
hf download hf://spaces/Enutrof/TheCollector/Dockerfile_subprocess
-
curl -L -o Dockerfile_subprocess https://huggingface.co/spaces/Enutrof/TheCollector/resolve/main/Dockerfile_subprocess
1.86 kB
| # Dockerfile | |
| # Use an official Python runtime as a parent image | |
| FROM python:3.12-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install system dependencies | |
| # - ffmpeg is crucial for yt-dlp for merging formats and segment downloads | |
| # - git is sometimes needed by yt-dlp for updates or certain extractors (optional but good to have) | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| git \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the requirements file into the container at /app | |
| COPY requirements.txt . | |
| # Install any needed packages specified in requirements.txt | |
| # RUN pip install --no-cache-dir -r requirements.txt | |
| # RUN python -m pip install --upgrade "pip>=26.2.2" \ | |
| # && pip install --no-cache-dir -r requirements.txt | |
| RUN python -m pip install "pip @ https://files.pythonhosted.org/packages/3f/06/3e4420302363fbb71be3c7f35ce042f54bfca330e3e66b3a2e3c4cca579f/pip-26.2.2-py3-none-any.whl#sha256=fd7f4dfa8190e014013b9f08f3e973f4e4c26ffd179a204895533a7254813a70" \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application's code into the container at /app | |
| # This assumes the bot script is named bot.py and is in the same directory as the Dockerfile | |
| # Adjust if the main script has a different name or is in a subdirectory. | |
| COPY . . | |
| # Expose a volume for downloads (but good for persisting data) | |
| # The bot script currently uses "video_downloads/" relative to its execution path. | |
| # So, /app/video_downloads/ will be the path inside the container. | |
| VOLUME /app/video_downloads | |
| # Expose a volume for cookies (for easier management) | |
| VOLUME /app/cookies | |
| # Command to run the application | |
| # CMD ["python", "bot_subprocess.py"] | |
| CMD ["python", "bot_telethon.py"] |