Skip to content

Commit

Permalink
Merge pull request #205 from stanfordnmbl/cache_opencap_image
Browse files Browse the repository at this point in the history
combine apt and pip commands into a single layer to reduce image size
  • Loading branch information
carmichaelong authored Oct 17, 2024
2 parents b1f6d30 + c6f4b9d commit 0b1de4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ FROM stanfordnmbl/opensim-python:4.3
# RUN add-apt-repository ppa:jonathonf/ffmpeg-4 ; apt update
# RUN apt-get install ffmpeg -y --fix-missing

RUN apt update
RUN apt install ffmpeg -y
# Combine apt commands into a single layer to reduce image size
RUN apt update && apt install --no-install-recommends -y ffmpeg && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace/
COPY requirements.txt /workspace/

RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
# Upgrade pip and install Python dependencies in one layer to reduce intermediate image size
RUN pip3 install --upgrade pip --no-cache-dir && pip3 install -r requirements.txt --no-cache-dir

COPY . /workspace/

Expand Down

0 comments on commit 0b1de4f

Please sign in to comment.