在我的gitlab-ci.yml中,我使用pandas scikit和scipy測試了一些代碼。 建設/管道大部分時間是花費編譯numpy,scipy,...在gitlab-ci中使用輪子以避免長時間編譯
我可以創建一個輪子,並使用ADD來複制和點子安裝一個已經制作的輪子嗎?
我requet了最新版本的pip
::
$ cat requirements/base.txt
pip>=8.1.2
setuptools>=20.7.0
wheel>=0.29
numpy
scipy
scikit-learn
這裏我.gitlab-ci
和用途不同,每次花費很多:
$ cat .gitlab-ci
image : python:2
test:
script:
- apt-get update -qy
- apt-get install -y python-dev python-pip python-virtualenv
- pip install -r requirements/base.txt
- ...
想在這裏回答了@ EV-BR gitlab -ci管道輸出,你可以看到熊貓不是作爲一個輪子,而是pandas-0.19.1.tar.gz。:
$ pip install -r requirements.txt --cache-dir=/cache
Requirement already satisfied: pip>=9 in /usr/local/lib/python3.6/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: setuptools>=26 in /usr/local/lib/python3.6/site-packages (from -r requirements.txt (line 2))
Collecting wheel>=0.29 (from -r requirements.txt (line 3))
Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting setuptools_scm (from -r requirements.txt (line 4))
Using cached setuptools_scm-1.15.0-py2.py3-none-any.whl
Collecting setuptools_scm_git_archive (from -r requirements.txt (line 5))
Using cached setuptools_scm_git_archive-1.0-py2.py3-none-any.whl
Collecting pandas==0.19.1 (from -r requirements.txt (line 6))
Downloading pandas-0.19.1.tar.gz (8.4MB)
Collecting python-dateutil>=2 (from pandas==0.19.1->-r requirements.txt (line 6))
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
沒有真正回答到車輪的問題,但你可以建立你所需要的一切定製泊塢窗容器(甚至建立它並將其存儲在gitlab)和方式跳過安裝完全。 –