Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyronn-torch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephan Seitz
pyronn-torch
Commits
c4cf223a
Commit
c4cf223a
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Travis: put code into file that's actually used
parent
8c604702
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/install_travis.sh
+0
-81
0 additions, 81 deletions
tests/install_travis.sh
tests/travis_install.sh
+11
-0
11 additions, 0 deletions
tests/travis_install.sh
with
11 additions
and
81 deletions
tests/install_travis.sh
deleted
100755 → 0
+
0
−
81
View file @
8c604702
#!/bin/bash
# This script is meant to be called by the "install" step defined in
# .travis.yml. See http://docs.travis-ci.com/ for more details.
# The behavior of the script is controlled by environment variabled defined
# in the .travis.yml in the top level folder of the project.
#
# This script is inspired by Scikit-Learn (http://scikit-learn.org/)
#
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
set
-e
if
[[
"
$DISTRIB
"
==
"conda"
]]
;
then
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
if
[[
-f
"
$HOME
/miniconda/bin/conda"
]]
;
then
echo
"Skip install conda [cached]"
else
# By default, travis caching mechanism creates an empty dir in the
# beginning of the build, but conda installer aborts if it finds an
# existing folder, so let's just remove it:
rm
-rf
"
$HOME
/miniconda"
# Use the miniconda installer for faster download / install of conda
# itself
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
\
-O
miniconda.sh
chmod
+x miniconda.sh
&&
./miniconda.sh
-b
-p
$HOME
/miniconda
fi
export
PATH
=
$HOME
/miniconda/bin:
$PATH
# Make sure to use the most updated version
conda update
--yes
conda
# Configure the conda environment and put it in the path using the
# provided versions
# (prefer local venv, since the miniconda folder is cached)
conda create
-p
./.venv
--yes
python
=
${
PYTHON_VERSION
}
pip virtualenv
source
activate ./.venv
alias
pip3
=
'python -m pip'
shopt
-s
expand_aliases
fi
if
[[
"
$CUDA_VERSION
"
==
10.1
]]
;
then
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv
cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo
apt-key adv
--fetch-keys
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo
add-apt-repository
"deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo
apt-get update
sudo
apt-get
-y
install
cuda
sudo
ldconfig
export
CUDA_HOME
=
/usr/local/cuda
export
PATH
=
/usr/local/cuda/bin:
$PATH
fi
# for all
pip3
install
-U
pip wheel setuptools
pip3
install
-U
cppimport pybind11
pip3
install
tox
pip3
install
codecov
pip3
install
sphinx
pip
install
flake8
if
[[
"
$COVERAGE
"
==
"true"
]]
;
then
pip3
install
-U
pytest-cov pytest-virtualenv coverage coveralls flake8
fi
travis-cleanup
()
{
printf
"Cleaning up environments ... "
# printf avoids new lines
if
[[
"
$DISTRIB
"
==
"conda"
]]
;
then
# Force the env to be recreated next time, for build consistency
source
deactivate
conda remove
-p
./.venv
--all
--yes
rm
-rf
./.venv
fi
echo
"DONE"
}
This diff is collapsed.
Click to expand it.
tests/travis_install.sh
+
11
−
0
View file @
c4cf223a
...
@@ -42,6 +42,17 @@ if [[ "$DISTRIB" == "conda" ]]; then
...
@@ -42,6 +42,17 @@ if [[ "$DISTRIB" == "conda" ]]; then
shopt
-s
expand_aliases
shopt
-s
expand_aliases
fi
fi
if
[[
"
$CUDA_VERSION
"
==
"10.1"
]]
;
then
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv
cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo
apt-key adv
--fetch-keys
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo
add-apt-repository
"deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo
apt-get update
sudo
apt-get
-y
install
cuda
sudo
ldconfig
export
CUDA_HOME
=
/usr/local/cuda
export
PATH
=
/usr/local/cuda/bin:
$PATH
fi
# for all
# for all
pip3
install
-U
pip wheel setuptools
pip3
install
-U
pip wheel setuptools
pip3
install
tox
pip3
install
tox
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment