Skip to content

Commit

Permalink
updating build script to work on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinay Bharadwaj Ramakrishnaiah committed Jan 6, 2022
1 parent 395a17f commit 6f83d09
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 301 deletions.
39 changes: 27 additions & 12 deletions setup/build_exarl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,38 @@ set -e
target=${EXARL_TARGET:-$(hostname --fqdn)}
echo "target = $target"

if [[ $target=*"summit"* ]]
then
if [[ $target == *"summit"* ]]; then
module purge
module load cuda/11.0.3
module load open-ce/1.4.0-py37-0
module load git-lfs

conda env create -f setup/environment.yml

elif [[ $target="darwin"* ]]
then
module load openmpi/3.1.0-gcc_7.3.0
module load anaconda/Anaconda3.2019.10
module load cuda/10.1

conda create -name exarl python=3.7
conda env create -f setup/summit_environment.yml
elif [[ $target == "darwin"* ]]; then
module load openmpi/3.1.6-gcc_9.4.0
module load miniconda3/py37_4.9.2
module load cuda/11.4.2
conda create --name exarl_darwin
source activate exarl_darwin
pip install -e setup/ --user
else
echo "Don't recognize this target/hostname: $(target)."
PYTHON_VERSION=3.7
# Use the miniconda installer for setup of conda itself
pushd .
cd
mkdir -p download
cd download
if [[ ! -f miniconda.sh ]]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O miniconda.sh
fi
chmod +x miniconda.sh && ./miniconda.sh -b -f
conda update --yes conda
echo "Creating conda environment."
conda create -n exarl_$target --yes python=$PYTHON_VERSION
cd ..
popd
# Activate the python environment
source activate exarl_$target
pip install -e setup/ --user
fi
288 changes: 0 additions & 288 deletions setup/environment.yml

This file was deleted.

2 changes: 1 addition & 1 deletion setup/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
setup(name='exarl',
version='0.0.1',
description='ExaRL is a high performance reinforcement learning framework',
install_requires=['tensorflow-gpu>=2.0.0', 'mpi4py', 'gym', 'ase',
install_requires=['tensorflow-gpu>=2.0.0', 'mpi4py', 'gym', 'ase', 'plotille',
'Lmfit', 'scikit-learn', 'pandas', 'numba', 'pybind11', 'pytest']
)

0 comments on commit 6f83d09

Please sign in to comment.