NayeonKeum / AWS-Sagemaker-MachineLearning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS 의 Sagemaker 를 이용한 머신 러닝 시스템 구축

강의에서 다룰 내용

  • AWS를 활용한 개발환경 이해하기
  • AWS IAM을 이용한 루트키 및 액세스 키 관리화기
  • AWS를 활용한 시스템 연동 이해하기
  • Github 를 이용한 개발 협업 이해하기
  • 로컬 컴퓨터를 이용한 머신 러닝 개발 환경 이해하기
  • Anaconda 를 활용한 python 가상환경 이해하기
  • Jupyter notebook 개발환경 이해하기
  • AWS Sagemaker 이해하기
  • AWS S3 활용법 이해하기
  • 시계열 데이터 예측을 위한 DeepAR 알고리듬 이해하기
  • AWS Sagemaker 를 이용한 데이터 훈련 및 테스트 실습
  • pandas, boto3 라이브러리 활용

Day #1

Class #1

AWS 계정 준비

Github

git clone https://github.com/mintbass/sm_edu.git

로컬 개발 환경 구축

  • Python 3.7 설치 : https://www.python.org/downloads/

  • Anaconda를 활용한 python 가상환경 설정하기 : https://teddylee777.github.io/python/anaconda-%EA%B0%80%EC%83%81%ED%99%98%EA%B2%BD%EC%84%A4%EC%A0%95-%ED%8C%81-%EA%B0%95%EC%A2%8C

    conda list
    
    • 가상환경 생성
    conda create -n smedu pandas tensorflow
    
    • 가상환경 시작
    conda activate smedu
    
    • 가상환경 종료
    conda deactivate
    
    • 가상환경 내보내기 (export)
    pwd
    /Users/mint/git/sm_edu
    conda env export > smedu.yaml
    
  • Jupyter 설치하기 (https://lsjsj92.tistory.com/531)

    • 가상환경에 jupyter notebook 설치
    conda install jupyter notebook
    
    • jupyter notebook에서 python 패키지를 관리할 수 있도록 해주는 nb_conda 설치
    conda install nb_conda
    
    • jupyter notebook 시작하기
    (smedu) mint@Marcuss-MacBook-Pro sm_edu % jupyter notebook
    [I 15:01:43.393 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
    [W 15:01:44.295 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
    [I 15:01:44.452 NotebookApp] [nb_conda] enabled
    [I 15:01:44.453 NotebookApp] Serving notebooks from local directory: /Users/mint/git/sm_edu
    [I 15:01:44.453 NotebookApp] The Jupyter Notebook is running at:
    [I 15:01:44.453 NotebookApp] http://Marcuss-MacBook-Pro.local:8888/?token=1c427019f02e1e5a13665e157679ecd4bbf8c40ef0e2df3f
    [I 15:01:44.453 NotebookApp]  or http://127.0.0.1:8888/?token=1c427019f02e1e5a13665e157679ecd4bbf8c40ef0e2df3f
    [I 15:01:44.453 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
    [C 15:01:44.476 NotebookApp]
    
        To access the notebook, open this file in a browser:
            file:///Users/mint/Library/Jupyter/runtime/nbserver-13592-open.html
        Or copy and paste one of these URLs:
            http://Marcuss-MacBook-Pro.local:8888/?token=1c427019f02e1e5a13665e157679ecd4bbf8c40ef0e2df3f
         or http://127.0.0.1:8888/?token=1c427019f02e1e5a13665e157679ecd4bbf8c40ef0e2df3f
    

Class #2

Python 개발 툴

Amazon CLI(Command Line Interface)

aws configure
AWS Access Key ID [None]: AKIAI44QH8EXAMPLE
AWS Secret Access Key [None]: je7MtGb3yCo8nvbEXAMPLEKEY
Default region name [None]: ap-northeast-2
Default output format [None]: 

Python Library 맛보기

  • pandas
  • boto3 를 이용한 S3 리소스 액세스
    • conda install boto3
    • S3에 버킷 만들기 (smedu)
    • IAM을 이용한 액세스 키 생성하기
    • aws configure 를 이용해서 AWS 프로파일 생성
    • boto3_S3_access.py 실행

숙제

Day #2

Class #1

AWS Sagemaker

Sagemaker 를 이용한 데이터 훈련 및 테스트 실습

Class #2

About


Languages

Language:Python 55.6%Language:Jupyter Notebook 44.4%