본문 바로가기

분류 전체보기120

[Docker][Error] bash: ifconfig: command not found docker 네트워크 관련하여 공부하는 중, $ docker pull centos $ docker run --gpus all --name centos_gpu centos $ ifconfig bash: ifconfig: command not found 가 발생하였다. ifconfig는 CentOS 6까지는 디폴트로 가능한 명령어였지만, CentOS 7부터는 디폴트가 아니라 설치해야 한다고 한다. 따라서, ifconfig 명령어가 포함된 net-tools package를 설치해야 한다. 그래서 yum install net-tools를 실행하였으나, 이것도 오류가 발생 $ yum install net-tools Failed to set locale, defaulting to C.UTF-8 CentOS Linu.. 2022. 12. 22.
[Docker] Docker Container 외부 노출하기 (PORT 바인딩) Docker Container 외부 노출하기 (HOST PORT 바인딩) 컨테이너는 가상머신과 마찬가지로 가상 IP주소를 할당 받는데, 기본적으로 도커는 컨테이너에 172.17.0.x의 IP를 순차적으로 할당합니다. 이는 컨테이너를 실행해서 ifconfig 명령어로 확인할 수 있습니다. 만일 아무런 설정을 하지 않았다면, 이 컨테이너는 외부에서 접근할 수 없으며 도커가 설치된 호스트에서만 접근할 수 있습니다. 따라서, 외부에 컨테이너를 노출하고 싶다면, IP와 포트를 호스트의 IP와 포트에 바인딩해야합니다. IP/PORT 연결 ✔ type#1 PORT만 바인딩 -p 옵션으로 호스트 80포트와 컨테이너 80포트를 연결 $ docker run -it --name mywebserver -p 80:80 cent.. 2022. 12. 21.
[Docker] Docker Container 실행 명령어 정리 Docker Container 관련 명령어 정리 ✔ Container 밖으로 나가기 $ exit 컨테이너를 나오면서 정지시킴 Ctrl+D Ctrl+P,Q 컨테이너를 나오면서 정지시키지 않음 ✔ Container 생성하기 $ docker create -it --name mycentos centos:7 컨테이너 생성하지만 내부로 들어가지는 않음 $ docker run-it --name mycentos centos:7 컨테이너 생성하며 내부로 들어감 ✔ Container 내부로 들어가기 $ docker run-it --name mycentos centos:7 컨테이너 생성하며 내부로 들어감 $ docker start mycentos $ docker attach mycentos ❓ docker "run" vs .. 2022. 12. 21.
[Docker][Error] CentOS 7 - File "/usr/bin/yum-config-manager", line 135 except yum.Errors.RepoError, e: 2022.12.21 - [Engineering/도커(Docker)] - [Docker] 리눅스 도커 엔진 설치 - CentOS 7 [Docker] 리눅스 도커 엔진 설치 - CentOS 7 리눅스 도커 엔진 설치 ✔ 설치 전 확인해야할 사항 호스트 운영체제 버전 : 최소 3.10 버전 이상 uname -r로 확인! 오래된 리눅스 배포판은 업데이트 지원 불가 : 지원 가능 배포판 (Ubuntu 14.04, 16.04, 1 hyen4110.tistory.com [리눅스 도커 엔진 설치 에러] CentOS 7 - File "/usr/bin/yum-config-manager", line 135 except yum.Errors.RepoError, e: CentOS 7 에서 아래 글과 같이 docker engine.. 2022. 12. 21.
[Docker] 리눅스 도커 엔진 설치 - CentOS 7 리눅스 도커 엔진 설치 ✔ 설치 전 확인해야할 사항 호스트 운영체제 버전 : 최소 3.10 버전 이상 uname -r로 확인! 오래된 리눅스 배포판은 업데이트 지원 불가 : 지원 가능 배포판 (Ubuntu 14.04, 16.04, 18.04, CentOS7) 64비트 리눅스 인지 확인 root 계정 또는 sudo 명령어를 통해 설치 ✔ CentOS 도커 엔진 설치 $ yum install -y yum-utils $ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo $ yum install -y docker-ce $ systemctl start docker *docker-ce란? 도커엔진은 도커 EE(D.. 2022. 12. 21.
[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.