-
Notifications
You must be signed in to change notification settings - Fork 139
MacOS 13 Apple Silicon (M1 or M2 chip) with GPU acceleration
Peter Leonard edited this page Mar 21, 2023
·
6 revisions
-
This was tested on macOS Ventura (13.2.1)
-
Install Miniforge for Apple Silicon. (See project page for more info.)
-
Create a new environment for pixplot:
conda create --name pixplot python=3.9
conda activate pixplot
- Install the required packages for Apple's support of Tensorflow on the M1 chip:
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
- Clone
pixplot
:
git clone https://github.com/YaleDHLab/pix-plot.git
- Adjust the
install_requires
section ofsetup.py
to read as follows:
install_requires=[
'cmake',
'Cython',
'glob2',
'h5py',
'iiif-downloader',
'matplotlib',
'numpy==1.23.5',
'numba',
'pytz',
'pointgrid>=0.0.2',
'python-dateutil>=2.8.0',
'scikit-learn',
'scipy',
'six',
'tqdm',
'umap-learn',
'yale-dhlab-rasterfairy>=1.0.3',
'yale-dhlab-keras-preprocessing>=1.1.1',
],
- Install:
python setup.py install
- Temporary fixes till we figure things out:
pip install --force matplotlib
pip install --force scipy
pip install --force numba
- Run:
time pixplot --images="datasets/oslomini/images/*.jpg" --metadata="datasets/oslomini/metadata/metadata.csv" --shuffle