Ubuntu 20.04에서 작업
참고한 링크:
Install OpenVINO™ Runtime on Linux from an Archive File — OpenVINO™ documentation — Version(nightly)
Install OpenVINO™ Runtime on Linux from an Archive File — OpenVINO™ documentation
To enable the toolkit components to use processor graphics (GPU) on your system, follow the steps in GPU Setup Guide. To perform inference on Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X VPU, follow the steps on NCS2 Setup
docs.openvino.ai
Configurations for Intel® Processor Graphics (GPU) with OpenVINO™ — OpenVINO™ documentation
Documentation navigation
docs.openvino.ai
1. OpenVINO Runtime 설치
사전 준비
#OpenVINO가 설치될 디렉토리 제작
sudo mkdir /opt/intel
#home에서 Downloads 폴더로 이동
cd ~/Downloads
toolkit 다운,설치해제 및 설치 디렉토리로 이동
#openvino 버전 확인!
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.2/linux/l_openvino_toolkit_ubuntu20_2022.2.0.7713.af16ea1d79a_x86_64.tgz --output openvino_2022.2.0.7713.tgz
tar -xf openvino_2022.2.0.7713.tgz
sudo mv l_openvino_toolkit_ubuntu20_2022.2.0.7713.af16ea1d79a_x86_64 /opt/intel/openvino_2022.2.0.7713
설치 코드 실행
#버전확인!
source /opt/intel/openvino_2022.2.0.7713/setupvars.sh
2. GPU 세팅
위에서 설치된 디렉토리로 이동
cd /opt/intel/openvino_2022.2.0.7713/install_dependencies/
설치 코드 실행
sudo -E ./install_NEO_OCL_driver.sh
아래와 같이 업데이트를 물을 수도 있는데, y를 눌러 진행한다.
이후 아래처럼 나오면 설치 완료
사진에서 보이듯이, 사용자를 video, render group에 추가한다.
#USERNAME 변경!
sudo usermod -a -G video,render USERNAME
3. pip 설치
가상환경 활성화 후, pip 버전 업데이트
python -m pip install --upgrade pip
openvino 설치
pip install openvino
4. 설치 확인
파이썬 환경에서, 아래의 코드를 실행할 경우,
from openvino.runtime import Core
ie = Core()
print(ie.available_devices)
아래처럼 나와야 한다.
또는, 아래의 코드로 확인할 수 있다.
devices = ie.available_devices
for device in devices:
device_name = ie.get_property(device, "FULL_DEVICE_NAME")
print(f"{device}: {device_name}")
output:
끝
'컴퓨터 > 리눅스 (LINUX)' 카테고리의 다른 글
Ubuntu, 마우스 드래그 이상, display_server_not_supported 에러 정리 (0) | 2022.12.30 |
---|---|
Ubuntu, ROCm, AMD GPU 설치 및 제거 (0) | 2022.12.03 |
Ubuntu, intel 내장 그래픽 사용하기 (1) | 2022.11.24 |
윈도우에서 우분투로 remote desktop 접속하기(XRDP) (0) | 2022.11.07 |
리눅스 커맨드 정리 (0) | 2022.08.31 |