Skip to content

Commit

Permalink
Move requirements.txt copy command below package installs
Browse files Browse the repository at this point in the history
Prevents full Docker rebuild when requirements.txt is changed.
  • Loading branch information
corystevens authored Apr 11, 2023
1 parent 0c6a275 commit c82c676
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM nvidia/cuda:11.7.0-devel-ubuntu22.04

COPY requirements.txt /requirements.txt
RUN apt-get update && apt-get install -y \
git \
curl \
Expand All @@ -11,6 +10,8 @@ RUN add-apt-repository ppa:deadsnakes/ppa \
&& apt install -y python3.10 \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

COPY requirements.txt /requirements.txt
RUN python3.10 -m pip install -r requirements.txt
RUN python3.10 -m pip install --upgrade torch==1.13.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117

Expand Down

0 comments on commit c82c676

Please sign in to comment.