2017-01-02 84 views
0

在我的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 
+0

沒有真正回答到車輪的問題,但你可以建立你所需要的一切定製泊塢窗容器(甚至建立它並將其存儲在gitlab)和方式跳過安裝完全。 –

回答

0

如果你的點數在最近足夠多(版本8或更高的IIRC),你可能只需要使用manulinux自動車輪就可以通過pip install numpy和scipy。在配置項上嘗試使用pip install --upgrade pip或類似項。

+0

我已經更新了我的問題,點是高於8 – user3313834

+0

相關問題是爲什麼它不使用manylinux輪。只能通過查看構建日誌來回答。 –