diff --git a/dockerfile b/dockerfile index ab802d85..6e591e1c 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,5 @@ FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime +COPY src/ pdm.lock pyproject.toml README.md /app_build/ RUN apt-get update -qq && apt-get install -qqy --no-install-recommends \ make \ build-essential \ @@ -7,12 +8,9 @@ RUN apt-get update -qq && apt-get install -qqy --no-install-recommends \ ffmpeg \ && rm -rf /var/lib/apt/lists/* WORKDIR /app_build -COPY src/ pdm.lock pyproject.toml README.md /app_build/ -RUN pip install pdm -RUN pdm use $(which python) -RUN pdm sync -RUN pip install pytorch-lightning==2.0.3 nltk>=3.8.1 -RUN python -m nltk.downloader averaged_perceptron_tagger && \ - python -m nltk.downloader cmudict -RUN pdm cache clear +RUN pip install pdm pytorch-lightning==2.0.3 nltk>=3.8.1 && \ + pdm use $(which python) && \ + pdm sync && \ + pdm cache clear && pip cache purge +RUN python -m nltk.downloader averaged_perceptron_tagger && python -m nltk.downloader cmudict WORKDIR /workspace \ No newline at end of file