Minor optimization to `pip install` in gmxapi CI build.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Thu, 8 Aug 2019 12:28:15 +0000 (15:28 +0300)
committerEric Irrgang <ericirrgang@gmail.com>
Wed, 14 Aug 2019 11:14:42 +0000 (13:14 +0200)
Change-Id: I247ca2c253a73b30cd21f36914bcf7c0ecbd7aa2

python_packaging/docker/ci.dockerfile

index ffd269826eda479b04f700b7156d3fe3b103743d..6fe196804ef02a7f9c52ec66f30ae31d80caee44 100644 (file)
@@ -63,10 +63,13 @@ COPY --from=gromacs /usr/local/gromacs /usr/local/gromacs
 ADD --chown=testing:testing src /home/testing/gmxapi/src
 ADD --chown=testing:testing src/gmxapi /home/testing/gmxapi/src/gmxapi
 
+# We use "--no-cache-dir" to reduce Docker image size. The other pip flags are
+# to eliminate network access and speed up the build, since we already know we
+# have installed the dependencies.
 RUN . $VENV/bin/activate && \
     . /usr/local/gromacs/bin/GMXRC && \
     (cd $HOME/gmxapi/src && \
-     pip install --no-cache-dir . \
+     pip install --no-cache-dir --no-deps --no-index --no-build-isolation . \
     )
 
 ADD --chown=testing:testing src/test /home/testing/gmxapi/test