Skip to content

Commit

Permalink
Merge pull request #338 from usnistgov/develop
Browse files Browse the repository at this point in the history
Add additional installations
  • Loading branch information
knc6 authored Oct 12, 2024
2 parents e4d6ac7 + 991920f commit 68c19dd
Show file tree
Hide file tree
Showing 16 changed files with 170 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install_ai.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test All Installations
name: Test AI Installations

on: [push, pull_request]

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/install_es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test ES Installations

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"] # Matrix with different Python versions
steps:
# Step 1: Check out the repository
- name: Check out code
uses: actions/checkout@v3

# Step 2: Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test_env

# Step 3: Run all installation scripts for each Python version
- name: Run installation scripts
shell: bash -l {0}
run: |
for script in jarvis_leaderboard/installations/ES/*.sh; do
# Extract script name to use as the environment name (without extension)
env_name=$(basename "$script" .sh)-${{ matrix.python-version }}
echo "Creating Conda environment: $env_name with Python ${{ matrix.python-version }}"
conda create -n "$env_name" python=${{ matrix.python-version }} -y
echo "Activating environment: $env_name"
conda activate "$env_name"
echo "Running $script"
chmod +x "$script"
bash "$script" || { echo "Error: $script failed"; exit 1; }
echo "Deactivating environment: $env_name"
conda deactivate
echo "Removing environment: $env_name"
conda env remove -n "$env_name" -y
done
42 changes: 42 additions & 0 deletions .github/workflows/install_ff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test FF Installations

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"] # Matrix with different Python versions
steps:
# Step 1: Check out the repository
- name: Check out code
uses: actions/checkout@v3

# Step 2: Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test_env

# Step 3: Run all installation scripts for each Python version
- name: Run installation scripts
shell: bash -l {0}
run: |
for script in jarvis_leaderboard/installations/FF/*.sh; do
# Extract script name to use as the environment name (without extension)
env_name=$(basename "$script" .sh)-${{ matrix.python-version }}
echo "Creating Conda environment: $env_name with Python ${{ matrix.python-version }}"
conda create -n "$env_name" python=${{ matrix.python-version }} -y
echo "Activating environment: $env_name"
conda activate "$env_name"
echo "Running $script"
chmod +x "$script"
bash "$script" || { echo "Error: $script failed"; exit 1; }
echo "Deactivating environment: $env_name"
conda deactivate
echo "Removing environment: $env_name"
conda env remove -n "$env_name" -y
done
42 changes: 42 additions & 0 deletions .github/workflows/install_qc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test QC Installations

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"] # Matrix with different Python versions
steps:
# Step 1: Check out the repository
- name: Check out code
uses: actions/checkout@v3

# Step 2: Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test_env

# Step 3: Run all installation scripts for each Python version
- name: Run installation scripts
shell: bash -l {0}
run: |
for script in jarvis_leaderboard/installations/QC/*.sh; do
# Extract script name to use as the environment name (without extension)
env_name=$(basename "$script" .sh)-${{ matrix.python-version }}
echo "Creating Conda environment: $env_name with Python ${{ matrix.python-version }}"
conda create -n "$env_name" python=${{ matrix.python-version }} -y
echo "Activating environment: $env_name"
conda activate "$env_name"
echo "Running $script"
chmod +x "$script"
bash "$script" || { echo "Error: $script failed"; exit 1; }
echo "Deactivating environment: $env_name"
conda deactivate
echo "Removing environment: $env_name"
conda env remove -n "$env_name" -y
done
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
![Leaderboard actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/test_build.yml/badge.svg)
![Leaderboard installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_ai.yml/badge.svg)
![Leaderboard AI installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_ai.yml/badge.svg)
![Leaderboard ES installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_es.yml/badge.svg)
![Leaderboard FF installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_ff.yml/badge.svg)
![Leaderboard QC installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_qc.yml/badge.svg)
![GitHub repo size](https://img.shields.io/github/repo-size/usnistgov/jarvis_leaderboard)
[![name](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/Analyzing_data_in_the_JARVIS_Leaderboard.ipynb)
[![Downloads](https://pepy.tech/badge/jarvis_leaderboard)](https://pepy.tech/project/jarvis_leaderboard)
Expand Down
5 changes: 4 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ In addition to prediction results, we aim to capture the underlying software, ha
As a minimum check, we test rebuilding of the leaderboard and installations of software using GitHub actions.

![Leaderboard actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/test_build.yml/badge.svg)
![Leaderboard installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_ai.yml/badge.svg)
![Leaderboard AI installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_ai.yml/badge.svg)
![Leaderboard ES installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_es.yml/badge.svg)
![Leaderboard FF installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_ff.yml/badge.svg)
![Leaderboard QC installation actions](https://github.com/usnistgov/jarvis_leaderboard/actions/workflows/install_qc.yml/badge.svg)


<!--number_of_benchmarks--> - Number of benchmarks: 296
Expand Down
2 changes: 1 addition & 1 deletion jarvis_leaderboard/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Version number."""
__version__ = "2024.7.26"
__version__ = "2024.10.10"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

conda install pandas numpy matplotlib abinit abipy --quiet
conda install pandas numpy matplotlib abinit abipy -c conda-forge --quiet

# Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/ABINIT_Example.ipynb
8 changes: 6 additions & 2 deletions jarvis_leaderboard/installations/ES/gpaw_linux_pip_colab.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
apt install python3-mpi4py cython3 libxc-dev gpaw-data
pip -q install gpaw
sudo apt-get update
sudo apt-get install libxc-dev
sudo apt install python3-mpi4py cython3 libxc-dev gpaw-data
conda install gpaw -c conda-forge
#pip -q install ase
#pip -q install gpaw
gpaw test

#Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/GPAW_Colab.ipynb
11 changes: 11 additions & 0 deletions jarvis_leaderboard/installations/ES/qe_linux_conda_colab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# May not be efficient
conda install qe -c conda-forge
#sudo apt-get update
#sudo apt-get install -y libfftw3-3 libfftw3-dev libfftw3-doc
#git clone https://github.com/QEF/q-e.git
#cd q-e
#DFLAGS='-D__FFTW3 ' FFT_LIBS='-lfftw3' ./configure
#make pw
# make ph
# Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/JARVIS_QuantumEspressoColab_Basic_Example.ipynb
7 changes: 4 additions & 3 deletions jarvis_leaderboard/installations/ES/qe_linux_make_colab.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
apt-get install -y libfftw3-3 libfftw3-dev libfftw3-doc
sudo apt-get update
sudo apt-get install -y libfftw3-3 libfftw3-dev libfftw3-doc
git clone https://github.com/QEF/q-e.git
cd q-e
!DFLAGS='-D__FFTW3 ' FFT_LIBS='-lfftw3' ./configure
make pw
#DFLAGS='-D__FFTW3 ' FFT_LIBS='-lfftw3' ./configure
#make pw
# make ph
# Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/JARVIS_QuantumEspressoColab_Basic_Example.ipynb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
apt-get install -y libfftw3-3 libfftw3-dev libfftw3-doc
sudo apt-get update
sudo apt-get install -y libfftw3-3 libfftw3-dev libfftw3-doc
git clone https://github.com/QEF/q-e.git
cd q-e
!DFLAGS='-D__FFTW3 ' FFT_LIBS='-lfftw3' ./configure
DFLAGS='-D__FFTW3 ' FFT_LIBS='-lfftw3' ./configure
make pw
# make ph

Expand Down
10 changes: 5 additions & 5 deletions jarvis_leaderboard/installations/ES/tb3py_linux_conda_colab.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

conda install conda-forge::julia -y --quiet
julia -e 'using Pkg; pkg"add '$PKG'; precompile;"' &> /dev/null
julia -e 'using Pkg; Pkg.add(url = "https://github.com/usnistgov/ThreeBodyTB.jl")' &> /dev/null
julia -e 'using Pkg; Pkg.add("Plot")' &> /dev/null
pip install -q jarvis-tools
#conda install conda-forge::julia -y --quiet
#julia -e 'using Pkg; pkg"add '$PKG'; precompile;"' &> /dev/null
#julia -e 'using Pkg; Pkg.add(url = "https://github.com/usnistgov/ThreeBodyTB.jl")' &> /dev/null
#julia -e 'using Pkg; Pkg.add("Plot")' &> /dev/null
#pip install -q jarvis-tools
# Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/tb3py.ipynb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
conda install lammps jarvis-tools -y --quiet
conda install lammps jarvis-tools -c conda-forge -y --quiet

# Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/JARVIS_LAMMPS_tutorial.ipynb
2 changes: 2 additions & 0 deletions jarvis_leaderboard/installations/QC/qiskit_linux_pip_colab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pip install -q jarvis-tools qiskit==0.43.1
# Example: https://colab.research.google.com/github/knc6/jarvis-tools-notebooks/blob/master/jarvis-tools-notebooks/JARVIS_LAMMPS_tutorial.ipynb
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="jarvis_leaderboard", # Replace with your own username
version="2024.7.26",
version="2024.10.10",
author="Kamal Choudhary",
author_email="[email protected]",
description="jarvis_leaderboard",
Expand Down

0 comments on commit 68c19dd

Please sign in to comment.