FROM python:3.10

# Install yt-dlp dependencies and yt-dlp itself
# Adding necessary packages including ffmpeg
RUN apt-get update && apt-get install -y \
    dos2unix \
    patchelf \
    && rm -rf /var/lib/apt/lists/* \
    && pip install --no-cache-dir nuitka==2.1.3 wheel

# install gzip
RUN apt-get update && apt-get install -y \
    gzip \
    && rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /host_dir

ARG REQUIREMENTS_FILE
COPY ${REQUIREMENTS_FILE} ./requirements.txt

COPY . /
# Make the entrypoint script executable
RUN chmod +x /entrypoint.sh
RUN dos2unix /entrypoint.sh



# Set the entrypoint to use /bin/sh
ENTRYPOINT ["sh", "/entrypoint.sh"]
