Commit 285514e6 authored by rusty1s's avatar rusty1s
Browse files

fix installation

parent 92d532d5
......@@ -71,16 +71,13 @@ jobs:
install:
- source script/conda.sh
- conda create --yes -n test python=${PYTHON_VERSION}
- source activate test
- conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes
- pip install flake8 codecov
- source script/cuda.sh
- source script/conda.sh
- python setup.py install
script:
- flake8 .
- pip install flake8 codecov
- if [ "${PYTHON_VERSION}" != "3.5" ]; then flake8 .; fi
- python setup.py test
after_success:
- python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}/${IDX}
......
......@@ -22,3 +22,14 @@ if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
fi
conda update --yes conda
conda create --yes -n test python="${PYTHON_VERSION}"
source activate test
conda install pytorch="${TORCH_VERSION}" "${TOOLKIT}" -c pytorch --yes
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" != "cpu" ]; then
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/script/module.h
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/argument_spec.h
sed -i.bak -e 's/return \*(this->value)/return \*((type\*)this->value)/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/pybind11/cast.h
fi
......@@ -92,10 +92,3 @@ fi
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" = "cu92" ]; then
sed -i.bak -e '129,141d' "${CUDA_HOME}/include/crt/host_config.h"
fi
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${IDX}" != "cpu" ]; then
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/script/module.h
sed -i.bak -e 's/constexpr/const/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/argument_spec.h
sed -i.bak -e 's/return \*(this->value)/return \*((type\*)this->value)/g' /c/tools/miniconda3/envs/test/lib/site-packages/torch/include/pybind11/cast.h
fi
......@@ -57,7 +57,7 @@ def get_extensions():
return extensions
install_requires = []
install_requires = ['zipp']
setup_requires = ['pytest-runner']
tests_require = ['pytest', 'pytest-cov']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment