-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
.travis.yml
51 lines (47 loc) · 1.67 KB
/
.travis.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
language: python
python: 2.7
dist: trusty
sudo: false
env:
global:
- NBCONVERT_ARGS="--to html --execute --ExecutePreprocessor.kernel_name=python --ExecutePreprocessor.timeout=-1"
install:
# xvfb
# https://docs.travis-ci.com/user/gui-and-headless-browsers/
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# install conda
# https://conda.io/docs/travis.html
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -f -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda config --add channels conda-forge
- conda info -a
- conda create -q --name fastai --file requirements.txt python=$TRAVIS_PYTHON_VERSION
- source activate fastai
- conda list
script:
- mkdir -p deeplearning1/nbs/data
- if [ ! -d deeplearning1/nbs/data/dogscats ]; then
curl -sSLO "http://files.fast.ai/data/dogscats.zip" &&
unzip -qq -d deeplearning1/nbs/data dogscats.zip;
fi
- travis_wait jupyter nbconvert deeplearning1/nbs/lesson1.ipynb $NBCONVERT_ARGS
- travis_wait jupyter nbconvert deeplearning1/nbs/lesson2.ipynb $NBCONVERT_ARGS
before_cache:
# We only cache the archives but not the extracted packages,
# such that the miniconda installer script can extract correctly.
- rm -rf $HOME/miniconda/pkgs/*/
cache:
timeout: 1000
directories:
- $HOME/miniconda/pkgs
- $HOME/.keras/models
- deeplearning1/nbs/data