M1 맥북 GPU에서 tensor flow 실행하는 방법

2023. 9. 6. 11:40ML

xcode-select --install

 

 

https://developer.apple.com/metal/tensorflow-plugin/

해당 사이트에서 miniforge3 다운하기

 

chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate

 

 

위의 과정이 끝난다면 터미널을 키고

conda create --name tf25 python=3.8

 

가상환경 생성이 끝난다면

conda activate tf25

bash -> tf25로 바뀐 것을 확인할 수 있다.

 

 

다음으로 Tensorflow-MacOS 설치

 

텐서플로우 의존성 설치

conda install -c apple tensorflow-deps

 

텐서플로우 본 패키지 설치

pip install tensorflow-macos

 

metal 플러그인 설치

pip install tensorflow-metal

 

다음 단계로 주요 라이브러리들을 설치

pandas jupyter notebook

 

conda install -c conda-forge -y pandas jupyter

 

 

 

'ML' 카테고리의 다른 글

ML 1장  (0) 2023.08.11