-
Notifications
You must be signed in to change notification settings - Fork 139
MacOS 12.2.1 Apple Silicon (M1 chip) with GPU acceleration
-
This was tested on macOS Monterey (12.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
pip install tensorflow-macos 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',
'numpy',
'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',
'matplotlib'
],
- Fix Pillow:
pip install --force-reinstall https://files.pythonhosted.org/packages/34/4e/a491038f9bb13ea7f69874789d2cb69577eefb16724d678602f42222128f/Pillow-9.0.1-1-cp39-cp39-macosx_11_0_arm64.whl
- Install
numba
via conda, not pip:
conda install -c numba numba
-
Run
python setup.py install
-
Optional steps past this point:
pip install image_datasets
(a helper utility to easily grab pixplot-ready datasets)
- Get a sample dataset:
python
import image_datasets
image_datasets.oslomini.download()
(now exit python via quit()
or CTRL+D)
- Test the installation:
time pixplot --images="datasets/oslomini/images/*.jpg" --metadata="datasets/oslomini/metadata/metadata.csv" --shuffle