Slide 1

Slide 1 text

#jawsdays #jd2017_d Deep Learning on AWS Ͱ ࣗ෼͚ͩͷֶशϞσϧΛ࡞Ζ͏ʂ by JAWS-UG AI ࢧ෦

Slide 2

Slide 2 text

#jawsdays #jd2017_d தؙ ྑ @pottava SUPINF Inc. (AWS Certified) SA, DevOps Engineer Pro ❤ Amazon ECS, AWS Batch, IAM

Slide 3

Slide 3 text

#jawsdays #jd2017_d גࣜձࣾεϐϯϑ

Slide 4

Slide 4 text

#jawsdays #jd2017_d ͜ΜͳձࣾͰ͢ • AWS Λத৺ʹɺΫϥ΢υωΟςΟϒͳ։ൃɾӡ༻อकͷडୗ • Docker Ͱͷ։ൃɾӡ༻ ͕େಘҙ • GPU, Jupyter, Mesos.. Պֶٕज़ܭࢉ؀ڥͷߏஙɾอकडୗ • ͦͷଞ Web αʔϏεɾωΟςΟϒΞϓϦɾۀ຿γεςϜɾɾ

Slide 5

Slide 5 text

#jawsdays #jd2017_d ૣ଎ɺσΟʔϓϥʔχϯά

Slide 6

Slide 6 text

#jawsdays #jd2017_d σϞ

Slide 7

Slide 7 text

#jawsdays #jd2017_d AWS ϗϫΠτϖʔύʔ͘Μ • σΟʔϓϥʔχϯάΛར༻ʢLSTM with MXNetʣ • AWS നॻɺPDF 27 ϑΝΠϧΛֶशσʔλʹར༻ • ग़ͩ͠ͷ਺୯ޠ͔ΒɺͦΕΒ͍͠ޙଓͷจষΛࣗಈੜ੒

Slide 8

Slide 8 text

#jawsdays #jd2017_d σϞͷྲྀΕ 1. ·ͣҰ౓ʢֶशෆे෼ͳʣਪ࿦͕ಈ͘͜ͱΛ֬ೝ 2. ͦͷޙվΊͯɺσʔλͷऔಘɾՃ޻ 3. ֶश 4. ৽൛ਪ࿦αʔϏεσϓϩΠ

Slide 9

Slide 9 text

#jawsdays #jd2017_d ਪ࿦ͷ༷ࢠ ʮAmazon EC2 isʯΛ༩͑ͨ࣌ͷɺֶशෆे෼ͳਪ࿦ྫ ৽͍͠ݴޠ͕ੜ·Ε·ͨ͠ɻ

Slide 10

Slide 10 text

#jawsdays #jd2017_d ਪ࿦ͷ༷ࢠ ʮAmazon EC2 isʯͰɺͦΕͳΓʹֶशͨ͠ޙͷਪ࿦ྫ ݴ͍͍ͨ͜ͱ͸Θ͔Γ·ͤΜ͕ɺ୯ޠ΍จ๏͸ਵ෼੒௕͠·ͨ͠ɻ

Slide 11

Slide 11 text

#jawsdays #jd2017_d γεςϜߏ੒ AWS Batch S3 2.ֶशδϣϒ౤ೖ ΤϯδχΞ SpotFleet ECR DeepLearning AMI v2 1.ֶशσʔλ౤ೖ 3.δϣϒεέδϡʔϧ 4.σʔλऔಘ & ֶश 5.݁ՌϞσϧΛอଘ ҰൠϢʔβ AWS Lambda 7.Ϟσϧऔಘ & ਪ࿦ APIGateway 6.ਪ࿦ϦΫΤετ 8.݁ՌԠ౴ ECS EC2 g2.2xlarge EC2 g2.2xlarge

Slide 12

Slide 12 text

#jawsdays #jd2017_d ΄΅શ෦ެ։͠·ͨ͠ • PDF 1 ຕఔ౓ͳΒ 10 ෼Ͱࢼͤ·͢ • AWS ΁ͷσϓϩΠπʔϧ܈͸Ұ෦ܝࡌ ʢશ෦ࢿྉԽ͢Δͷ͸೉ّͳ΋ͷͰ..ʣ https://github.com/pottava/mxnet-char-lstm

Slide 13

Slide 13 text

#jawsdays #jd2017_d ͳΔ΄ͲΘ͔ΒΜ • ެ։͞Εͨࢿྉ͚ͩͰ͸Α͘෼͔Βͳ͍ɻ͸͍ɾɾ • Qiita Ͱ΋৘ใൃ৴͠·͢ • σΟʔϓϥʔχϯάͰ΋ AWS ͷઃܭͰ΋ • Twitter ͳͲͰฉ͍ͯ΋Β͑Ε͹༨ྗ͋Δͱ͖౴͑·͢ :) • ͓ؾܰʹ @pottava ·Ͱ

Slide 14

Slide 14 text

#jawsdays #jd2017_d ৼΓฦΓ

Slide 15

Slide 15 text

#jawsdays #jd2017_d Ͳ͏࡞ͬͨͷ͔ 1. PDF Λద౰ʹμ΢ϯϩʔυʢσʔλऩूɺ5 ෼ʣ 2. ֶश͠΍͍͢Α͏ʹσʔλΛՃ޻ʢલॲཧɺ30 ෼ʣ 3. LSTM ωοτϫʔΫʹ౤ೖʢֶशɺ5 ࣌ؒʣ 4. REST API Λ࣮૷ʢਪ࿦ɺ45 ෼ʣ ʢ + ຊࢫͰͳ͍ AWS ͷઃܭɺϑϨʔϜϫʔΫͷΩϟονΞοϓʹ૬Ԡͷ࣌ؒʣ

Slide 16

Slide 16 text

#jawsdays #jd2017_d ͳͥΫϥ΢υͰʁ • ֶशσʔλ΍࡞੒ͨ͠Ϟσϧ͸ൺֱతେ͖ͳϑΝΠϧ • ֶशɺྫ͑͹Ұൠ޲͚ PC ͩͱͦΕ͚ͩͰ਺೔͔͔Δ • Ұ࣌తʹɺ๲େͰߴੑೳͳܭࢉೳྗ͕࢖͑Δ • ਪ࿦αʔϏεͷσϓϩΠɾӡ༻΋ͱͯ΋؆୯

Slide 17

Slide 17 text

#jawsdays #jd2017_d Կ͕Ͳ͏ػցֶशͩͬͨͷʁ ❌ʮ͜ͷ୯ޠ͕ೖྗ͞ΕͨΒɺ͜͏ग़ྗͯ͠ʯ ⭕ʮେྔʹಡΜͩจষΛੜ͔ͯ͠ɺ࣍ͷ୯ޠΛ༧ଌͯ͠Ͷʯ

Slide 18

Slide 18 text

#jawsdays #jd2017_d Կ͕Ͳ͏σΟʔϓͩͬͨͷʁ จষͷࣗಈੜ੒ʹ࢖ͬͨػցֶशͷख๏͕ LSTM ͱ͍͏ ϦΧϨϯτχϡʔϥϧωοτϫʔΫ͔ͩͬͨΒɻ ʁʁʁ

Slide 19

Slide 19 text

#jawsdays #jd2017_d σΟʔϓϥʔχϯά ʢਂ૚ֶश / DLʣ.

Slide 20

Slide 20 text

#jawsdays #jd2017_d σΟʔϓϥʔχϯάͱ͸ • ଟ૚ߏ଄ͷχϡʔϥϧωοτϫʔΫΛ༻͍ͨػցֶशͷ͜ͱ • χϡʔϥϧωοτϫʔΫͱ͍͏ಠಛͳܗͰอ࣋͞Εͨ • ҎԼͷ a ͱ b ΛܾΊΔ͜ͱֶ͕श ɹy = ax + b • ͦΕΛ΋ͱʹ x ͕͖ͨΒ y ͱฦ͢ͷ͕ɺਪ࿦

Slide 21

Slide 21 text

#jawsdays #jd2017_d σΟʔϓϥʔχϯάͱ͸ • ࣮ࡍ͸๲େͳม਺ͦΕͧΕʹ࠷ద஋Λ୳͠ʮϞσϧʯΛੜ੒ • Ұͭͷ૚ͷɺҰͭͷϊʔυ͚ͩͰ΋ม਺͸ͨ͘͞Μ ɹy = f ( w1x1 + w2x2 + w3x3 + … + wnxn + b )

Slide 22

Slide 22 text

#jawsdays #jd2017_d Α͘ݟΔ DL ͷྫ • Amazon Rekognition ͷҰൠ෺ମݕग़͸ɺ͖ͬͱ CNNɻ • ৞ΈࠐΈχϡʔϥϧωοτϫʔΫʢCNNʣ ෳ਺ͷ૚͕͋Γ·͢Ͷʙ

Slide 23

Slide 23 text

#jawsdays #jd2017_d Ͱ͸

Slide 24

Slide 24 text

#jawsdays #jd2017_d Ͳ͏΍ͬͯϞσϧΛ࡞Δͷ͔

Slide 25

Slide 25 text

#jawsdays #jd2017_d ࢼߦࡨޡ͢ΔͨΊͷ

Slide 26

Slide 26 text

#jawsdays #jd2017_d Ϋϥ΢υͷ౷߹ݚڀ؀ڥ

Slide 27

Slide 27 text

#jawsdays #jd2017_d Jupyter as a Service • ࢼߦࡨޡɺݚڀͷڞ༗ͷελϯμʔτͱ͍͑͹ Jupyter • ࠷ۙྲྀߦͷػೳ֦ுɿΫϥ΢υͷσʔλετΞͱͷ࿈ܞ • σʔλͷநग़ɺม׵ɾՃ޻ɺͦͷऔΓࠐΈʢETLʣ • AWS ͸Ұาग़஗Ε͍ͯΔ΋ͷͷɾɾ

Slide 28

Slide 28 text

#jawsdays #jd2017_d Google Cloud Datalab

Slide 29

Slide 29 text

#jawsdays #jd2017_d Google Cloud Datalab • TensorFlow ✖ BigQuery ͷྫ • ͦͷૢ࡞ UI ͱͯ͠ Jupyter ɹϕʔεͷ Cloud Datalab • ϩʔΧϧ൛·Ͱ͋Δɾɾ

Slide 30

Slide 30 text

#jawsdays #jd2017_d Azure ML Studio

Slide 31

Slide 31 text

#jawsdays #jd2017_d ͱʹ͔͘ੑೳॏࢹ or ࣗ༝ʹ ϑϨʔϜϫʔΫΛબͼ͍ͨͳΒ

Slide 32

Slide 32 text

#jawsdays #jd2017_d GPU ΍ Infiniband ΛؚΉ ϚϧνΫϥ΢υ HPC ؀ڥ ΦϯϓϨͱͷϋΠϒϦοτ΋ɻ ࢖͑ΔϑϨʔϜϫʔΫଟ਺ʂʂ

Slide 33

Slide 33 text

#jawsdays #jd2017_d ฒྻԋࢉʹΑΔֶश

Slide 34

Slide 34 text

#jawsdays #jd2017_d ֶशϑΣʔζ͸ HPC • ػցֶशͰͷֶश͸ɺ๲େͳύϥϝλΛܭࢉ͢Δ͜ͱ • ຊ֨తʹͳΔఔɺखڐͷ൚༻୺຤Ͱ͸౸ఈܭࢉͰ͖ͳ͍

Slide 35

Slide 35 text

#jawsdays #jd2017_d όονίϯϐϡʔςΟϯά • ແݶʹεέʔϧ͢Δߴੑೳ / GPU ౥ࡌͷΫϥελ܈ • ࣮ߦॱংʢґଘʣͷ͋ΔδϣϒΛฒྻ෼ࢄॲཧ • ͦΕͰ΋ऴΘΒͳֶ͍शɾɾ • AWS ͸͜ͷྖҬ͕͍·೤͍ʂʂ

Slide 36

Slide 36 text

#jawsdays #jd2017_d AWS Batch • Ϛωʔδυ όονίϯϐϡʔςΟϯά؀ڥ • Ϋϥελ؅ཧɺΩϡʔɺεέδϡʔϥΛ AWS ʹ͓೚ͤ • Ωϡʔ͕ਂ͘ͳΔͱࣗಈͰεέʔϧʂʂ • SpotFleet ͱ౷߹͞Ε͍ͯΔʂ • Docker ϕʔεʹͳ͓ͬͯΓɺLinux ܥͷॲཧ͸ͳΜͰ΋ಈ͘

Slide 37

Slide 37 text

#jawsdays #jd2017_d AWS Batch • ࠓճͷΑ͏ʹɺGPU Λ࢖͍͍ͨ / ಠࣗ AMI Λ࢖͍͍ͨ • ΋͘͠͸ t2 ܥΠϯελϯεͰࢼ͍ͨ͠ • ͦΜͳ࣌͸ʮUnmanaged ؀ڥʯΛબ୒͢Ε͹ OKʂ • ASG ΍ SpotFleet ͷ্Ͱ ECS Λಈ͔ͤ͹े෼շదͰ͢

Slide 38

Slide 38 text

#jawsdays #jd2017_d AWS Batch ʢҙ֎ʁͳར༻ྫʣ S3 ʹ͋͛ͨେྔը૾ Rekognition Ͱͷ Ұൠ෺ମݕग़Λ AWS Batch ͔Β࣮ߦɻ

Slide 39

Slide 39 text

#jawsdays #jd2017_d ϋϯζΦϯ͋Γ㽂 ΈΜͳେ޷͖ɺCOBOL ͷఆྫόον Λ AWS Batch Ͱ

Slide 40

Slide 40 text

#jawsdays #jd2017_d αʔϏε඼࣭͕ॏཁɺਪ࿦

Slide 41

Slide 41 text

#jawsdays #jd2017_d ਪ࿦ϑΣʔζ͸ 24 / 365 • εϚϗɺIoT ػثͰਪ࿦Ͱ͖ΔΑ͏ʹͳ͖ͬͯͨݱ୅ • Մ༻ੑͱϨΠςϯγ͕ॏཁɺҰൠͷαʔϏεͱಉ͡ • EC2 Ͱ API Λఏڙ͢Δ͜ͱ΋΋ͪΖΜͰ͖Δ͕ • ͦΕɺLambda Ͱ΋ಈ͘Α

Slide 42

Slide 42 text

#jawsdays #jd2017_d AWS Lambda http://aws.typepad.com/sajp/2017/01/seamlessly- scale-predictions-with-aws-lambda-and-mxnet.html

Slide 43

Slide 43 text

#jawsdays #jd2017_d AMI for DeepLearning !! • ͍΍ɺ΍ͬͺΓֶशɾਪ࿦ͱ EC2 ͕͍͍ͱ͍͏ํɺ࿕ใͰ͢ • Batch ΍ ECS Ͱ΋༗༻ɺશ෦ೖΓ AMI ʂʂ • ࠷৽ͷ TensorFlow, MXNet, ɹCaffe, CNTK, Theano, Torchɻɻ ɹAnaconda ΋ೖͬͯ·͢ʂ

Slide 44

Slide 44 text

#jawsdays #jd2017_d DeepLearning AMI • ࠓճͷσϞͰ΋࢖͍·ͨ͠ • GPU Λ࢖͏࣌ͷ೉ؔɺNVIDIA υϥΠό΋ηοτΞοϓࡁ • docker & ecs-agent Λ user-data ͰΠϯετʔϧ͢Ε͹ ɹAWS Batch ΍ Amazon ECS Ͱ΋؆୯ʹಈ࡞͠·͢

Slide 45

Slide 45 text

#jawsdays #jd2017_d JAWS-UG AI ࢧ෦

Slide 46

Slide 46 text

#jawsdays #jd2017_d ίϯςϯπ • AWS Ͱ AI αʔϏεΛ࣮૷ɾӡ༻͢ΔͨΊͷ ɹҰൠతͳٕज़৘ใɺ஌ݟɺࣄྫڞ༗ͷ৔ • ͢Ͱʹ׆༻͍ͯ͠Δํ • ಋೖΛݕ౼͍ͯ͠Δํ • ԿͦΕ͓͍͍͠ͷʁͳํʢ։࠵͝ͱʹ೉қ౓͕ଟগҧ͍·͢ʣ

Slide 47

Slide 47 text

#jawsdays #jd2017_d ࠓ݄຤εϖγϟϧճ։࠵ʂ • 3 / 31 (ۚ) 19:00 ʙ • HPC ઐ໳ࢧ෦ͱͷ߹ಉΠϕϯτ • AWS ຊ͔ࣾΒήετ 2 ໊ʂʂ

Slide 48

Slide 48 text

#jawsdays #jd2017_d ӡӦϝϯόʔ

Slide 49

Slide 49 text

#jawsdays #jd2017_d Thank you for coming! ࢀߟจݙ: • AWS Batch – ؆୯ʹ࢖͑ͯޮ཰తͳόονίϯϐϡʔςΟϯάػೳ – AWS https://aws.amazon.com/jp/batch/ • AWS Black Belt Online SeminarʮAWS Batchʯͷࢿྉ͓ΑͼQAެ։ http://aws.typepad.com/sajp/2017/02/aws-black-belt-online-seminar-aws- batch.html#QCPzBdn.twitter_tweet_count_m • re:Invent 2016: AWS Big Data & Machine Learning Sessionsɻ https://aws.amazon.com/blogs/big-data/reinvent-2016-aws-big-data- machine-learning-sessions/