본문 바로가기

반응형

hacking or software engineering skills/etc

(19)
[docker] docker 처음 실행시 python 실행 안 하게 하기 docker 생짜 초보여서 한참 찾았다. 문제점 - 어떤 이미지의 경우 초기 실행 명령어가 아예 python이라 docker 이미지를 run하면 바로 python이 실행됐다. - 다른 라이브러리를 유기적으로 함께 써야하기에 문제가 있었다. 하나의 라이브러리 이미지로 python이 실행되면 이것만 import 되므로.... (ex) tensorflow 이미지를 실행시키니 python 콘솔로 들어가버림, 그러면 seaborn이나 pandas 등이 설치되어 있지 않으면 이용 못하게 된다 해결방법 docker 실행시 마지막에 /bin/bash를 실행시켜준다. ls, cd . 등등 삽질을 했지만 이게 방법이었다. (ex) docker run -it {이미지이름} /bin/bash dololak.tistory.co..
[3d] 3d 구를 DSM으로 만들기 TIN to DSM TIN? Triangular Irregular Network DSM? Digital Surface Model 보통 지형 모델을 2.5D TIN으로 만든 후 이를 DSM으로 만든다. 이 작업을 구현했는데 Terratin(지형)으로 바로하기엔 고난이도라 간단한 구로 먼저 해보았다. In [1]: from pyhull.convex_hull import ConvexHull from pyhull.delaunay import DelaunayTri from Delaunator.Delaunator import Delaunator from time import time import pyvista In [2]: import parmap import numpy as np create grid¶ In [2..
[3d] pymesh 설치하기, ubuntu pip install pymesh2 git clone https://github.com/qnzhou/PyMesh.git git submodule update –init cd PyMesh git submodule update --init cd $PYMESH_PATH/third_party python build.py all 이렇게 빌드가 진행된다. cd $PYMESH_PATH mkdir build cd build cmake .. make make tests ./setup.py build ./setup.py install python -c "import pymesh; pymesh.test()" 위 과정으로 안 된다면 docker로 진행해야 한다. mac os 같은 경우 위 과정으로 설치를 성공했으나, ubun..
rasputin library import하기 설치... github.com/expertanalytics/rasputin expertanalytics/rasputin Raster DEM to TIN tools. Contribute to expertanalytics/rasputin development by creating an account on GitHub. github.com brew install cmake brew install gmp brew install boost brew install mpfr brew install openblas 위 library들을 다 설치하고, github에서 하라는대로 다 했는데도 안 됨. -> mac os에서는 안 돼서 -> linux에서 위 라이브러리를 모두 설치 후 빌드 성공적으로 설치 import tes..
[imaginare 설치] TypeError: Class advice impossible in Python3 에러 문제 TypeError: Class advice impossible in Python3. Use the @Implementer class decorator instead. apex 에러 해결법 apex를 지우고 다시 설치해준다. git clone https://www.github.com/nvidia/apex cd apex python setup.py install github.com/NVIDIA/apex/issues/116 TypeError: Class advice impossible in Python3 · Issue #116 · NVIDIA/apex TypeError Traceback (most recent call last) in () ----> 1 from pytorch_pretrained_bert..
python으로 폴더 지우기 (os, shutil) 파일을 지울 때는 os.remove를 사용하는데. 이걸 폴더에 사용하면 안 먹힌다. import os folder = '/temp/blar' os.remove(folder) 에러가 난다. 폴더는 어떤 방식으로 지울까?? 2가지 방법이 있다. 1. os.rmdir import os folder = '/temp/blar' os.rmdir(folder) 2. shutil.rmtree 1 번 방법이 안 통할 때가 있다. 폴더내에 또 파일들이 들어있을 경우다. 그럴 경우 이 방법을 쓴다. shutil.rmtree(folder, ignore_errors=True)
conda error pyenv와 conda를 동시에 설치했을 때 나는 에러 pyenv: conda: command not found The `conda' command exists in these Python versions: anaconda3-5.3.1 Note: See 'pyenv help global' for tips on allowing both python2 and python3 to be found. 해결책 pyenv virtualenvs를 입력한다. 원하는 conda 가상환경 이름을 확인한다. 나의 경우 pyenv activate anaconda3-5.3.1/envs/torch를 입력했다. conda info --envs를 할 경우 정상 작동함을 확인 가능. 결론 pyenv activate가 conda 보다 먼..
ImportError: IProgress not found. jupyter lab tqdm, notebook tqdm 에러 문제 jupyter lab을 쓰는데 tqdm이 이상하게 자꾸 줄 바뀜이 일어난다. 그래서 찾아보니 stackoverflow.com/questions/23113494/double-progress-bar-in-python Double Progress Bar in Python Is there a way to create a double progress bar in Python? I want to run two loops inside each other. For each loop I want to have a progress bar. My program looks like: import time for i1 in range... stackoverflow.com 여기에 enlighten 함수는 jupyterlab에 안..

728x90
반응형