From 08f14883e25391c03e29c61e659bdcab547d7a81 Mon Sep 17 00:00:00 2001 From: Marko Henning Date: Thu, 10 Oct 2024 14:07:36 +0200 Subject: [PATCH] Bring dockerfile up to date --- Dockerfile | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 95db093..a9feb8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #pytorch Image -FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime +FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime # Labels @@ -14,33 +14,31 @@ LABEL url="https://github.com/JSchmie/ScrAIbe" # Install dependencies WORKDIR /app -ARG model_name=medium -#Enviorment Dependncies -ENV TRANSFORMERS_CACHE /app/models -ENV HF_HOME /app/models -ENV AUTOT_CACHE /app/models -ENV PYANNOTE_CACHE /app/models/pyannote +#Enviorment dependencies +ENV TRANSFORMERS_CACHE=/app/models +ENV HF_HOME=/app/models +ENV AUTOT_CACHE=/app/models +ENV PYANNOTE_CACHE=/app/models/pyannote #Copy all necessary files COPY requirements.txt /app/requirements.txt COPY README.md /app/README.md -COPY models /app/models COPY scraibe /app/scraibe -COPY setup.py /app/setup.py -#Installing all necessary Dependencies and Running the Application with a personalised Hugging-Face-Token -RUN apt update && apt-get install -y libsm6 libxrender1 libfontconfig1 -RUN conda update --all +#Installing all necessary dependencies and running the application with a personalised Hugging-Face-Token +RUN apt update -y && apt upgrade -y && \ + apt install -y libsm6 libxrender1 libfontconfig1 && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN conda install pip -RUN conda install -y ffmpeg -RUN conda install -c conda-forge libsndfile -RUN pip install torchaudio==0.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html -RUN pip install -r requirements.txt -RUN pip install markupsafe==2.0.1 --force-reinstall +RUN conda update --all && \ + # conda install -y pip ffmpeg && \ + conda install -c conda-forge libsndfile && \ + conda clean --all -y +# RUN pip install torchaudio==0.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html +RUN pip install --no-cache-dir -r requirements.txt -RUN python3 -m 'scraibe.cli' --whisper-model-name $model_name # Expose port EXPOSE 7860 # Run the application -ENTRYPOINT ["python3", "-m", "scraibe.cli" ,"--whisper-model-name", "$model_name"] \ No newline at end of file +ENTRYPOINT ["python3", "-m", "scraibe.cli"] \ No newline at end of file