diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..74d5d19a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM condaforge/linux-anvil +ADD . /root/nglview +RUN cd /root/nglview \ + && sh devtools/circleci/install_miniconda.sh \ + && /opt/conda/bin/python setup.py install +# CMD ["nglview", "demo"] diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..d4165454 --- /dev/null +++ b/circle.yml @@ -0,0 +1,11 @@ +machine: + services: + - docker + +dependencies: + override: + - docker pull condaforge/linux-anvil + +test: + override: + - docker build -t nglview:dev . diff --git a/devtools/circleci/install_miniconda.sh b/devtools/circleci/install_miniconda.sh new file mode 100644 index 00000000..3d0d4ec1 --- /dev/null +++ b/devtools/circleci/install_miniconda.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +yum install -y \ + wget \ + unzip + +# miniconda=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh +# wget $miniconda -O miniconda.sh +# bash miniconda.sh -b +# export PATH=/root/miniconda3/bin:$PATH +export PATH=/opt/conda/bin/:$PATH +conda update --yes --all +conda install --yes conda-build anaconda-client numpy matplotlib +conda info +conda install --yes jupyter notebook nose numpy mock coverage cython netcdf4 +# pytraj +pip install pytraj +# mdanalysis +conda config --add channels MDAnalysis +conda install mdanalysis -c kain88-de --yes +# mdtraj +conda install mdtraj -c omnia --yes +# ParmEd +conda install -c ambermd parmed --yes +# ase +pip install https://github.com/hainm/ase/archive/3.11.0.tar.gz +# simpletraj +# turn off for now since this package requires install from source code. +# pip install git+https://github.com/arose/simpletraj +# rdkit +# conda install rdkit -c rdkit --yes + +# update a bunch of stuff +conda install --yes -c conda-forge ipywidgets notebook pyzmq diff --git a/setup.py b/setup.py index d04db6ed..c5fd458a 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def enable_extentions(): from notebook.nbextensions import enable_nbextension_python enable_nbextension_python('widgetsnbextension') enable_nbextension_python('nglview') - except Exception as e: + except: print('Failed to enable extensions {}'.format(e)) def js_prerelease(command, strict=False): @@ -57,7 +57,7 @@ def run(self): try: self.distribution.run_command('jsdeps') - except Exception as e: + except: missing = [t for t in jsdeps.targets if not os.path.exists(t)] if strict or missing: log.warn('rebuilding js and css failed')