I am using pip in three different steps. pip install -r requirements.txt takes almost 60 seconds to run. So I am spending several minutes installing the same requirements in three different spots. What am I missing and how can I make this better?
Simplified workflow.. but even with the cache it is killing me
image: python:3.6.3
options:
docker: true
pipelines:
branches:
master:
- parallel:
- step:
name: Build Images
caches:
- docker
- pip
script:
- pip install -r requirements.txt
- ./build/build.sh
- step:
name: Test Code
caches:
- pip
script:
- pip install -r requirements.txt
- python ./manage.py test
services:
- postgres
- step:
name: Do something else
caches:
- pip
script:
- pip install -r requirements.txt
- python ./do_something_else
definitions:
services:
postgres:
image: postgres:10.3
Most of the pip time is spent downloading.. can I also cache that somehow?
<span> Downloading <a href="https://files.pythonhosted.org/packages/65/85/20bdd72f4537cf2c4d5d005368d502b2f464ede22982e724a82c86268eda/sqlparse-0.2.4-py2.py3-none-any.whl" target="_blank" rel="nofollow noopener noreferrer">https://files.pythonhosted.org/packages/65/85/20bdd72f4537cf2c4d5d005368d502b2f464ede22982e724a82c86268eda/sqlparse-0.2.4-py2.py3-none-any.whl<br></a></span><span>Collecting python-memcached (from djcacheutils==3.0.0->-r <a href="https://bitbucket.org/listingmirror/listing_mirror/src/d7d2712c00afa857feeea8f4bd7f7da335c51d3b/requirements.txt" target="_blank" rel="noopener noreferrer">requirements.txt</a> (line 18))</span><span> Downloading <a href="https://files.pythonhosted.org/packages/f5/90/19d3908048f70c120ec66a39e61b92c253e834e6e895cd104ce5e46cbe53/python_memcached-1.59-py2.py3-none-any.whl" target="_blank" rel="nofollow noopener noreferrer">https://files.pythonhosted.org/packages/f5/90/19d3908048f70c120ec66a39e61b92c253e834e6e895cd104ce5e46cbe53/python_memcached-1.59-py2.py3-none-any.whl<br></a></span><span>Collecting django-appconf (from django-celery-email==2.0.0->-r <a href="https://bitbucket.org/listingmirror/listing_mirror/src/d7d2712c00afa857feeea8f4bd7f7da335c51d3b/requirements.txt" target="_blank" rel="noopener noreferrer">requirements.txt</a> (line 20))</span><span> Downloading <a href="https://files.pythonhosted.org/packages/5b/78/726cdf3e04660560cf25f9def95b8f2736310c581dabed9adfe60154a9f8/django_appconf-1.0.2-py2.py3-none-any.whl" target="_blank" rel="nofollow noopener noreferrer">https://files.pythonhosted.org/packages/5b/78/726cdf3e04660560cf25f9def95b8f2736310c581dabed9adfe60154a9f8/django_appconf-1.0.2-py2.py3-none-any.whl<br></a></span><span>Collecting py-moneyed>=0.7 (from django-money==0.12.3->-r <a href="https://bitbucket.org/listingmirror/listing_mirror/src/d7d2712c00afa857feeea8f4bd7f7da335c51d3b/requirements.txt" target="_blank" rel="noopener noreferrer">requirements.txt</a> (line 21))</span><span> Downloading <a href="https://files.pythonhosted.org/packages/4c/2c/3c57645cddb0e64aac10749829a843eb5e3aab8e067e2c870d98c38a7947/py_moneyed-0.7.0-py3-none-any.whl" target="_blank" rel="nofollow noopener noreferrer">https://files.pythonhosted.org/packages/4c/2c/3c57645cddb0e64aac10749829a843eb5e3aab8e067e2c870d98c38a7947/py_moneyed-0.7.0-py3-none-any.whl<br></a></span><span>(212kB)</span><span>Collecting google-api-core<2.0.0dev,>=0.1.1 (from google-cloud-storage==1.8.0->-r <a href="https://bitbucket.org/listingmirror/listing_mirror/src/d7d2712c00afa857feeea8f4bd7f7da335c51d3b/requirements.txt" target="_blank" rel="noopener noreferrer">requirements.txt</a> (line 29))</span><span> Downloading <a href="https://files.pythonhosted.org/packages/e3/39/b082c5bd0095d2baf6638338b66c5b6d2e8e372f605a1a85f33c0abe5533/google_api_core-1.1.1-py2.py3-none-any.whl" target="_blank" rel="nofollow noopener noreferrer">https://files.pythonhosted.org/packages/e3/39/b082c5bd0095d2baf6638338b66c5b6d2e8e372f605a1a85f33c0abe5533/google_api_core-1.1.1-py2.py3-none-any.whl</a> </span><span>Collecting sqlparse>=0.2.0 (from django-debug-toolbar==1.9.1->-r <a href="https://bitbucket.org/listingmirror/listing_mirror/src/d7d2712c00afa857feeea8f4bd7f7da335c51d3b/requirements.txt" target="_blank" rel="noopener noreferrer">requirements.txt</a> (line 17))</span>