본문 바로가기
반응형

분류 전체보기130

[Docker][Error] plugin "nvidia-docker" not found. docker 컨테이너를 gpu로 실행하는데 아래 에러가 발생 Status: Image is up to date for pytorch/pytorch:latest docker: Error response from daemon: create nvidia_driver_440.118.02 : error looking up volume plugin nvidia-docker: plugin "nvidia-docker" not found. 아래 링크 참고하여 해결 sudo service nvidia-docker start (아래로 해결되었다고 하는 사람도 있음) sudo nvidia-docker-plugin 참고 글 https://github.com/NVIDIA/nvidia-docker/issues/437 Error l.. 2022. 12. 20.
[Docker][jupyternotebook] 도커로 tensorflow 주피터노트북 연결하기 `. 아래를 실행하여 tensorflow 주피터노트북 이미지를 pull 한다. docker pull tensorflow/tensorflow:nightly-jupyter 2. 포트를 연결하여 실행한다. docker run -it --gpus all -p 8888:8888 tensorflow/tensorflow:nightly-jupyter 둘중 하나를 복사해서 PC에서 이동하면 아래와 같음 2022. 12. 15.
[Docker] the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' Git-Bash에서 docker run을 했을 때, 아래 메세지가 발생하였다. the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' 구글링을 해보니 (https://stackoverflow.com/questions/48623005/docker-error-on-windows-the-input-device-is-not-a-tty-if-you-are-using-mintty) Git-Bash에서는 디폴트로 설치되는 'winpty'로 실행을 해야 docker 작업을 할수 있다. 실제로, 명령어 앞에 winpty를 넣어서 하니 정상적으로 작동한다. 하지만 일일히 winpty를 입력하는 것이 싫다면 .. 2022. 12. 15.
[Docker] Docker Container에서 git 사용하기 - Bash git command not found docker 도커 컨테이너에서 git clone을 하고 싶지만 아래와 같은 에러가 뜬다. bash: git command not found docker 새롭게 만든 container 이기 때문에 git을 설치해줘야함 apt update apt install -y git git --version git clone [git주소] 정상적으로 git clone 됨 확인하였다! 2022. 12. 15.
[Docker][Error] Using default tag: latest Cannot connect to the Docker daemon at ~/Is the docker daemon running? 리눅스에서 Docker을 시작하고자 하는데 아래 메세지가 난다면, # Error message Using default tag: latest Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?1. Docker 상태 확인 systemctl status docker 2. Docker 시작 systemctl start docker3. Docker 활성화 systemctl enable docker> 이후 status가 바뀜 확인 2022. 12. 13.
[Faiss][Erorr] name 'GpuResourcesVector' is not defined name 'GpuResourcesVector' is not defined 특정 서버에서 이전에는 발생하지 않던 에러가 갑자리 발생 사용하는 2개의 가상환경 모두 동시에 발생 에러 로그가 찍힌 시점은, 위와 같이 faiss index를 gpu로 올릴 때 faiss_index = faiss.index_cpu_to_all_gpus(faiss_index) 그리고 faiss.get_num_gpus() 를 찍어보면 0이 나온다. 서버의 GPU의 문제일것이라 생각하여 상태를 체크했지만, 아무 문제 없음 - cuda.is\_available() : True - self.device : cuda:0 이것저것 시도해도 안되서 faiss 라이브러리를 재설치하는데 conda faiss 라이브러리 관련 경로가 오염되었다는 경고.. 2022. 12. 12.
[Pytorch][Error] ’BertTokenizerFast' object has no attribute '_in_target_context_manager' Pytorch에서 Transformer 라이브러리를 사용하는데 여러 가상환경에서 테스트를 해보다가 이전에는 없었던 아래 에러가 발생하는것을 확인 ’BertTokenizerFast' object has no attribute '_in_target_context_manager' 찾아보니, transformers 라이브러리 4.22.x 와 4.21.x 버전에서 같은 에러가 발생한다고함 더 낮은 버전으로 다운그레이드하여 해결 pip install --force-reinstall transformers==4.20.1 https://github.com/MaartenGr/BERTopic/issues/718#issuecomment-1248934705 'BertTokenizerFast' object has no attr.. 2022. 12. 12.
[Error] EOFError : Ran out of input 유사문서 매칭 모델 서비스에서 문서 텍스트를 BERT 계열 언어모델을 사용하여 embedding vector로 전환한 후, faiss 라이브러리를 통해 유서 문서 검색 기능을 제공하고 있다. 좀 더 자세히말하자면, faiss index를 생성한 후, 검색 대상 문서(Document Pool)에 embedding vector를 추가하는데 저장해놓은 pickle파일 형태의 벡터를 불러온다. 이때, EOFError : Ran out of input 에러가 발생 원인을 파악한 결과, 새로운 문서가 추가 되거나 인코더 역할을 하는 언어모델을 교체하여 새로운 인덱싱을 진행한 후 파일을 다시 저장할때, 즉, 아래처럼 with open을 'wb'로 실행할 때 비정상적으로 기능이 종료가되어 파일이 손상된 것이 원인이었다.. 2022. 12. 12.
[torchserve] torchserve start -> ModuleNotFound Error (import yaml) torchserve를 실행하는데 ModuleNotFoundError가 나면서 yaml을 import하라는 로그가 떨어졌다. conda list에 이미 yaml이 있는데 안되서 해결방법을 찾다가 아래 실행해서 해결! pip install pyyaml https://stackoverflow.com/questions/14261614/how-do-i-install-the-yaml-package-for-python 위 방법으로도 안되어서 아래로 해결 $ conda install -c anaconda pyyaml 2022. 12. 6.
[VSCode] SSH 원격 서버 연결 오류 반복 원래 정상적으로 SSH 연결이 잘 되었던 서버인데, 연결이 안되고 비밀번호를 계속 다시 입력하라는 창이 뜬다면, 아래와 같이 해보자. [F1]을 누르고 'uninstall'만 입력하면 아래와 같이된다 'Remote-SSH: Uninstall VS Code Server from Host...' 클릭하고 문제 서버를 클릭한 후 재연결하면 해결됨 2022. 12. 2.
[Error] FileNotFoundError: No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp' 어제까지 잘 실행되었는데 오늘 갑자기 에러가 났다 FileNotFoundError: \[Errno 2\] No usable temporary directory found in \['/tmp', '/var/tmp', '/usr/tmp' ..\] 저장 공간이 부족하다는 의미인것 같아서, 가장 빨리 해볼 수 있는 conda clean --all 을 해줬더니 conda clean --all : 사용하지 않는 packages 나 cache 제거 아래처럼 총 9GB 이상의 파일이 삭제되었다. 그리고 정상적으로 실행됨 확인 2022. 11. 24.
[Torchserve]'NoneType' object is not callable 새로운 서버에서 기존에 생성한 mar파일로 torchsere 실행 시, 다른 서버에서는 정상적으로 작동하였으나 특정 서버에서 Handler가 request마다 초기화 되어 'NoneType Error'가 발생함을 확인함 찾은 원인을 정리하자면 아래 2가지이다. 1. CUDA와 NVIDIA-driver의 설치 여부 및 호환성 문제 [확인 방법] torch.cuda.is_available() = False [해결 방법] CUDA와 NVIDIA driver가 설치되어있는지, 서로 호환이 가능한지 확인 ✔ CUDA 확인 : nvcc -V ✔ NVIDIA driver 확인 : nvidia-smi nvidia driver 에 맞는 CUDA는 10.2 인데(이미지), 실제 설치된 CUDA는 10.0이어서 호환성이 맞.. 2022. 11. 14.
[Torchserve] java.lang.NoSuchMethodError 새로운 서버에서 기존에 생성한 mar파일로 torcsherve 실행시, java.lang.NosuchMethodError 오류 발생함 이는 java version의 문제로 java 1.8 버전을 사용하는 서버에서 모두 문제가 발생했음. java 11이상으로 변경했을때 정상적으로 작동함 확인 ✔️ 아래 명령어를 실행하여 java 버전 변경 update-alternatives --config java ✔️ java11이 설치되어있지 않다면 아래 진행해서 설치 $ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install openjdk-11-jdk ✔️ 아래와 같은 오류 메세지가 뜬다면, sudo 추가 update-alternatives: using .. 2022. 11. 14.
[Torchserve] ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found 새로운 서버에서 기존에 생성한 mar 파일로 torchserve start를 했을때 위의 오류 발생 libstdc++.so.6.0.19 → so.6.0.26 이상으로 업그레이드 후 해결됨 1. 버전확인 ll /usr/lib64/libstdc++.so.6 2. 원하는 버전이 있는 위치 찾기 sudo find / -name "libstdc++.so.6" libstdc++.so.6이 존재하는 모든 위치가 출력되지만, 26 이상 으로 업그레이드 하고자 하므로, 26이 있는 위치 선택함 ~/anaconda3/envs/odqa/lib/libstdc++.so.6.0.26 3. /usr/lib64/ 위치에 최신버전 파일 이동 sudo cp [2에서 찾은 경로] /usr/lib64 4. 기존 링크 삭제 rm -rf /u.. 2022. 11. 14.
[NVIDIA] Linux NVIDIA driver 설치 오류 - 'exit X before installing' 리눅스 NVIDIA driver 수동 설치 중 아래 에러 발생 You appear to be running an X server; please exit X before installing. For further details, please see the section INSTALLING THE NVIDIA DRIVER in the README available on the Linux driver download page at www.nvidia.com 1. 아래 명령어로 DisplayManager를 비활성화 시킨후 실행 systemctl isolate multi-user.target 2. 설치 완료 후에는 다시 활성화 시키기! systemctl start graphical.target 아래 글을 참고함 .. 2022. 11. 9.
반응형