Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a smaller and more efficient image for faster build time #1212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM python:3.6
FROM python:3.6-slim

RUN apt-get -y update && apt-get -y install ffmpeg
# Security: Be specific on version, so use ffmpeg=<version>
RUN apt-get update && apt-get -y upgrade && apt-get install -y ffmpeg
# RUN apt-get -y update && apt-get -y install git wget python-dev python3-dev libopenmpi-dev python-pip zlib1g-dev cmake python-opencv

ENV CODE_DIR /root/code

# Security: Preserve the ownership of the files and directories, so that the files are owned by the right user and group.
# So use COPY --chown=<user:group> . $CODE_DIR/baselines
COPY . $CODE_DIR/baselines
WORKDIR $CODE_DIR/baselines

Expand All @@ -13,6 +16,6 @@ RUN rm -rf __pycache__ && \
find . -name "*.pyc" -delete && \
pip install 'tensorflow < 2' && \
pip install -e .[test]


CMD /bin/bash
RUN apt-get clean
CMD ["/bin/bash"]