Month: September 2016

docker – create own

가. centOS Docker 설치 docker pull centos https://hub.docker.com/_/centos/ 나. Container 연결 centos Docker 를 기본으로 필요한 것들을 설치하고 이미지로 생성하여 개인 Repository 에 등록하는 순서로 진행하고자 한다. docker run -t -i centos  다. 개인 이미지를 만들자 컨테이너에 접속해서 원하는 라이브러리든 환경이든 구성을 한다. 예를 들면 아래와 같은 행위를 말하는 것이다. 지신이 설정하고자 하는 환경을 모두 구성한 후에 […]

Read more

docker – install

처음 AWS EC2 환경을 구성하고 아무것도 없는 상태에서 테스트를 진행하였습니다. AWS – EC2 OS : RedHat 64bit 가. 삭제하기 기존에 설치된 Docker 를 사용하거나, 신규 설치인 경우에는 불필요 yum list installed | grep docker docker-engine.x86_64 1.12.1-1.el7.centos @docker-main-repo sudo yum -y remove docker-engine.x86_64 rm -rf /var/lib/docker 나.  자동설치 sudo yum update curl -fsSL https://get.docker.com/ | sh [trouble shooting when ssh […]

Read more

git – force pull

로컬에 있는 내용을 무시하고 git 에서 내려 받기 git fetch –all git reset –hard origin/master 특정   branch 에서 내려받기 git fetch –all git reset –hard origin/some_branch 작업중인 내용을 branch 로 만들고 내려받기 git checkout master git branch (branch name) git fetch –all git reset –hard origin/master  

Read more

DJango – templates & static

가. 시작하기 장고에서 뷰를 개발하려고 하면 통상적으로 필요한 것이  html, js, css, img 정도가 될 것이다. 그럼 장고에서는 이러한 파일들을 어떻게 관리하고 개발하는지 세팅 부분까지만 정리하고자 한다 나. template 정의하기 [setting.py] DIRS 부분에 templates 폴더의 위치를 지정해 준다. TEMPLATES = [ { ‘BACKEND’: ‘django.template.backends.django.DjangoTemplates’, ‘DIRS’: [os.path.join(BASE_DIR, ‘tfmsaview/templates/’)], ‘APP_DIRS’: True, ‘OPTIONS’: { ‘context_processors’: [ ‘django.template.context_processors.debug’, ‘django.template.context_processors.request’, […]

Read more

CentOS LibreOffice 설치

참조 사이트 RedHat 계열 , 64Bit 기준으로 작성되었습니다. 가.필요한 파일 다운로드 wget http://download.documentfoundation.org/libreoffice/stable/5.2.0/rpm/x86_64/LibreOffice_5.2.0_Linux_x86-64_rpm.tar.gz  나. 기존 버전 제거 yum remove openoffice* libreoffice*  다. 압축해제 tar -xvf LibreOffice_5.2.0_Linux_x86-64_rpm.tar.gz  라. 설치 # cd /tmp/LibreOffice_5.2.0.4_Linux_x86-64_rpm/RPMS/ # yum localinstall *.rpm    

Read more

TensorFlow – 기본문법 (6) – CNN Load & Predict

niektemme/tensorflow-mnist-predict 위 의 github 를 참조하였으며, 로컬에서 파일 로드, 배열 변환, 모델 로드 및 실행까지 간단하게 코드가 잘 정리되어 있습니다.  여기까지는 기본 구조를 파악하기 위함이었으니 기존예제들을 분석하는 위주로 진행하였지만, 다음부터는 가변적인 데이터 구조와 가변적인 모델을 감안한 개발을 시작하고자 합니다. 가. 로컬 이미지 로드 및 배열로 변환 def imageprepare(argv): “”” 로컬에서 이미지를 받아서 Tensorflow 처리 가능한 […]

Read more

TensorFlow – 기본문법 (5) – CNN Train & Save

가. 테스트 코드 개요 본 테스트 코드는 TensorFlow 를 활용하여 CNN , max pool , drop out, softmax 를 적용하여 MNLP(손글씨 예제)를 학습 시키고 저장하는 예제이다. 테스트 코드 다운로드 나. 테스트 데이터 로딩 및 변수 선언 아래처럼 메트릭스 연산이 수행되기 때문에 위와 같이 데이터 사이즈를 잡은 것이다. x : 인풋레이어에 사용할 변수 정의 y : […]

Read more

Linux User 생성

가 . Super User – sudo passwd root 나. 계정 중복 확인 cat /etc/passwd | grep testuser 다. 계정 생성 useradd 계정명 -m -s /bin/bash 라. 비밀번호 생성 passwd 계정명 마. 계정 생성 확인 cat /etc/passwd cut -f1 -d: /etc/passwd  

Read more

Python – TensorFlow – Django 개발환경 구축 종합

가. OS  환경 구축 및 기본 설정 (링크) – Linux 계정 생성 나. Anaconda 및 Pycharm 설치 (링크) 다. GitHub – Pycharm  연동 (링크) 라. Django – Rest F/W – TensorFlow 연동 – 설치 및 개발 1부 – 설치 및 개발 2부 – 설치 및 개발 3부 마.  Jenkins  CI 환경 구축 및 활용 (링크)

Read more

PyCharm – Git 연동

가.   Git Account Create 아래의 주소에 접속하여 계정을 생성 – URL : https://github.com/ 나. 프로젝트를 생성 다. Pycharm 연동 [상단 메뉴 > VCS >> Check Out from .. >> Github] 아래와 같은 창이 나오면, 아까 생성했던 계정을 입력해 주세요 [해당 환경에서 앞으로 사용할 비밀번호 생성] [어떤 프로젝트를 가지고 올지 결정] [프로젝트 로드 완료]  [자원 커밋하기] […]

Read more