|
|
|
FROM nvidia/cuda:12.6.1-cudnn-runtime-ubuntu24.04 |
|
|
|
|
|
ARG REPO_URL=https://github.com/rmusser01/tldw.git |
|
ARG BRANCH=main |
|
ARG GPU_SUPPORT=cpu |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
ffmpeg \ |
|
libsqlite3-dev \ |
|
build-essential \ |
|
git \ |
|
python3 \ |
|
python3-pyaudio \ |
|
portaudio19-dev \ |
|
python3-pip \ |
|
python3-venv \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN useradd -m -u 1009 user9 |
|
|
|
|
|
USER user9 |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
|
|
|
|
|
|
RUN git clone -b ${BRANCH} ${REPO_URL} . |
|
|
|
|
|
RUN python3 -m venv venv |
|
ENV PATH="$HOME/app/venv/bin:$PATH" |
|
|
|
|
|
RUN pip install --no-cache-dir nvidia-cublas-cu12 nvidia-cudnn-cu12 |
|
|
|
|
|
RUN if [ "$GPU_SUPPORT" = "cuda" ]; then \ |
|
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu123; \ |
|
elif [ "$GPU_SUPPORT" = "amd" ]; then \ |
|
pip install torch-directml; \ |
|
else \ |
|
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu; \ |
|
fi |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN if [ "$GPU_SUPPORT" = "cpu" ]; then \ |
|
sed -i 's/cuda/cpu/' ./Config_Files/config.txt; \ |
|
fi |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENV GRADIO_SERVER_NAME="0.0.0.0" |
|
|
|
|
|
CMD ["python", "summarize.py", "-gui"] |
|
|