Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GudPy on Apple Silicon #462

Open
2 tasks
rhinoella opened this issue Nov 9, 2023 · 0 comments
Open
2 tasks

GudPy on Apple Silicon #462

rhinoella opened this issue Nov 9, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@rhinoella
Copy link
Contributor

rhinoella commented Nov 9, 2023

  • Create documentation to illustrate how to get GudPy on Apple Silicon.
  • Change PySide version in requirements.txt to 6.6.0

Here are the steps:

Install Dependencies

We will be using Homebrew as the package manager. Get Homebrew via:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Using Homebrew, install the following dependencies:

brew install cmake
brew install zlib
brew install gsl
brew install libaec
brew install hdf5
brew install xcb-util-keysyms
brew install xcb-util-image
brew install xcd-util-wm
brew install python@3.9
arch -arm64 brew install llvm

Get gcc and create a link:

brew install gcc@11
sudo ln /opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/libgfortran.5.dylib /usr/local/opt/gcc@11/lib/gcc/11/libgfortran.5.dylib

Install the following dependencies using pip:

pip3 install h5py
pip3 install ruamel-yaml
pip3 install chardet
pip3 install pyside6

Build Dependencies

Clone the following repositories in your home directory:

git clone https://github.com/disorderedmaterials/GudPy
git clone https://github.com/disorderedmaterials/ModEx
git clone https://github.com/disorderedmaterials/Gudrun

ModEx

cd ModEx
mkdir build && cd build

To compile the code, you will have to specify the GSL directories. Replace 2.7.1 with the GSL version being used:

cmake ../ -DLOCAL_STATIC_GSL=ON -DGSL_DIR=/opt/homebrew/Cellar/gsl/2.7.1 - -DCMAKE_OSX_ARCHITECTURES:string"arm64" 
DGSL_INCLUDE_DIR=/opt/homebrew/include/gsl

Build:

cmake --build .
cmake --install . --prefix=$HOME/ModEx

GudRun

cd Gudrun
mkdir build && cd build
cmake ../ -DBUILD_SZIP:bool=true -DCMAKE_OSX_ARCHITECTURES:string"arm64" -DCMAKE_INSTALL_PREFIX:path=pwd/..
make install

Copy and paste the built binary

Building GudPy

Edit requirements.txt file so that PySide version is set to 6.6.0.

cd GudPy
python3 -m install -r requirements.txt
pyside6-rcc gudpy/gui/widgets/resources/resources.qrc > gudpy/gui/widgets/resources/resources_rc.py
# Copy startup files and binaries from Gudrun to GudPy
cp <Gudrun dir>/bin/ <GudPy-dir>/bin
cp -r ../Gudrun/StartupFiles ./bin
@rhinoella rhinoella added the documentation Improvements or additions to documentation label Nov 9, 2023
@rhinoella rhinoella self-assigned this Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant