-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
39 lines (39 loc) · 1.37 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
node('gpu') {
try {
stage('Clean') {
sh "rm -rf .[^.] .??* *"
}
stage('Checkout') {
sh "cp -r ${pwd()}@script/* ."
}
stage('Setup') {
env.CUDA_VISIBLE_DEVICES=0
sh """
virtualenv --python=python3 ".venv-$BUILD_NUMBER"
. .venv-$BUILD_NUMBER/bin/activate
sed -ri 's/^ *tensorflow *(=|<|>|\$)/tensorflow-gpu\\1/g' requirements.txt
sed -i "s/stream=True/stream=False/g" deeppavlov/core/data/utils.py
python setup.py develop
pip install http://lnsigo.mipt.ru/export/en_core_web_sm-2.0.0.tar.gz
python -m spacy link en_core_web_sm en --force
pip install -r requirements-dev.txt
"""
}
stage('Tests') {
sh """
. .venv-$BUILD_NUMBER/bin/activate
pytest -v
"""
}
} catch (e) {
emailext to: '${DEFAULT_RECIPIENTS}',
subject: '${PROJECT_NAME} - Build # ${BUILD_NUMBER} - FAILED!',
body: '${BRANCH_NAME} - ${BUILD_URL}',
attachLog: true
throw e
}
emailext to: '${DEFAULT_RECIPIENTS}',
subject: '${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!',
body: '${BRANCH_NAME} - ${BUILD_URL}',
attachLog: true
}