From be79ce0d36dce2d64f710a5fbeb3de7ad4ff557a Mon Sep 17 00:00:00 2001 From: Noam Bernstein Date: Mon, 22 Jul 2024 14:47:07 -0400 Subject: [PATCH] PIP_CONSTRAINTS -> PIP_CONSTRAINT --- .github/workflows/pytests.yml | 46 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pytests.yml b/.github/workflows/pytests.yml index eba1d271..14627ea7 100644 --- a/.github/workflows/pytests.yml +++ b/.github/workflows/pytests.yml @@ -19,7 +19,7 @@ jobs: env: coverage-on-version: "3.9" use-mpi: True - PIP_CONSTRAINTS_FILE: pip_constraints.txt + PIP_CONSTRAINT: pip_constraint.txt defaults: run: shell: bash -l {0} @@ -40,13 +40,13 @@ jobs: - name: Install dependencies from pip run: | - echo "numpy<2" >> $HOME/$PIP_CONSTRAINTS_FILE - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit flake8 pytest pytest-cov requests + echo "numpy<2" >> $PIP_CONSTRAINT + python3 -m pip install wheel setuptools numpy scipy click matplotlib pyyaml spglib rdkit flake8 pytest pytest-cov requests - name: Install latest ASE from pypi run: | - echo PIP_CONSTRAINTS_FILE $HOME/$PIP_CONSTRAINTS_FILE - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE ase + echo PIP_CONSTRAINT $PIP_CONSTRAINT + python3 -m pip install ase echo -n "ASE VERSION " python3 -c "import ase; print(ase.__file__, ase.__version__)" @@ -66,56 +66,54 @@ jobs: run: | # find mklvars for pkg in $( apt list --installed | fgrep "installed" | fgrep "mkl" | sed "s#/.*##" ); do - if dpkg -L $pkg | egrep -q 'vars.sh$'; then - mklvars=$( dpkg -L $pkg | egrep 'vars.sh$' ) + if dpkg -L $pkg | egrep -q 'setvars.sh$'; then + mklvars=$( dpkg -L $pkg | egrep 'setvars.sh$' ) break fi done - if [ -z $mklvars ]; then - echo 'Failed to find *vars.sh in any pkg named *mkl*' + if [ $( echo $mklvars | wc -w ) != 2 ]; then + echo "wrong number of mkl setvars.sh '$mklvars'" 1>&2 exit 1 fi - echo mklvars $mklvars - nl $mklvars source $mklvars intel64 - export PIP_CONSTRAINTS=$HOME/$PIP_CONSTRAINTS_FILE + export PIP_CONSTRAINT=$PWD/$PIP_CONSTRAINT git clone https://github.com/phonopy/phonopy cd phonopy - echo python3 -m pip install -c $PIP_CONSTRAINTS -e . -vvv - python3 -m pip install -c $PIP_CONSTRAINTS -e . -vvv + echo python3 -m pip install -e . -vvv + python3 -m pip install -e . -vvv cd .. git clone https://github.com/phonopy/phono3py cd phono3py - python3 -m pip install -c $PIP_CONSTRAINTS -e . -vvv + python3 -m pip install -e . -vvv cd .. - name: Install Quippy from PyPI - run: python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE quippy-ase + run: python3 -m pip install quippy-ase - name: Install xTB (before things that need pandas like MACE and wfl, since it will break pandas-numpy compatibility by downgrading numpy) run: | conda install -c conda-forge xtb-python - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE typing-extensions + python3 -m pip install typing-extensions # install pandas now to encourage compatible numpy version after conda regressed it - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE pandas + python3 -m pip install pandas - name: MACE run: | echo "search for torch version" set +o pipefail - torch_version=$( python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE torch== 2>&1 | fgrep 'from versions' | sed -e 's/.* //' -e 's/)//' ) + torch_version=$( python3 -m pip install torch== 2>&1 | fgrep 'from versions' | sed -e 's/.* //' -e 's/)//' ) echo "found torch version $torch_version, installing cpu-only variant" - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE torch==${torch_version}+cpu -f https://download.pytorch.org/whl/torch_stable.html + python3 -m pip install torch==${torch_version}+cpu -f https://download.pytorch.org/whl/torch_stable.html echo "installing mace" - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE git+https://github.com/ACEsuit/mace.git@main + python3 -m pip install git+https://github.com/ACEsuit/mace.git@main python3 -c "import mace; print(mace.__file__)" - name: Julia and ace fit run: | - python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE threadpoolctl + python3 -m pip install threadpoolctl wget https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.1-linux-x86_64.tar.gz tar xzf julia-1.8.1-linux-x86_64.tar.gz # note that this hardwires a particular compatible ACE1pack version @@ -123,7 +121,7 @@ jobs: ${PWD}/julia-1.8.1/bin/julia ace1pack_install.jl - name: Install wfl (expyre and universalSOAP are dependencies) - run: python3 -m pip install -c $HOME/$PIP_CONSTRAINTS_FILE . + run: python3 -m pip install . - name: Install Quantum Espresso run: | @@ -157,7 +155,7 @@ jobs: run: | # this can eaily be turned off if needed conda install -c conda-forge mpi4py openmpi pytest-mpi - python3 -m pip install -c $PIP_CONSTRAINTS_FILE mpipool + python3 -m pip install mpipool - name: Install and configure slurm and ExPyRe run: |