$30 off During Our Annual Pro Sale. View Details »

データ分析と Docker / Data Analysis with Docker

データ分析と Docker / Data Analysis with Docker

ちゅらデータ社内 LT

Yuki Ishikawa

August 24, 2018
Tweet

More Decks by Yuki Ishikawa

Other Decks in Technology

Transcript

  1. Docker ͷಛ௃ (1/2) • ίϯςφܕͷԾ૝Խ • ϗετͱΧʔωϧΛڞ༗ • Linux Ͱ͔͠ಈ͔ͳ͍

    (※) • ଎͍ ※ Windows, macOS ͷ Docker ͸ Linux VM ͷ্Ͱಈ͍͍ͯΔ
  2. Docker ͷಛ௃ (2/2) • ϙʔλϒϧ • ϗετϚγϯʹґଘ͠ͳ͍ͷͰͲ͜Ͱ΋ಈ͘ • ϩʔΧϧͰ࡞ͬͨΠϝʔδΛͦͷ··ຊ൪؀ڥʹσϓϩΠ •

    ؆୯ʹίϯςφΛ࡞ͬͯյͤΔ • ؀ڥߏஙͷίετ͕͔͔Βͳ͍ • (αʔϏε։ൃ) ॊೈͳσϓϩΠϑϩʔ͕૊ΊΔ • (σʔλ෼ੳ) ࣮ݧ؀ڥΛ޷͖ͳ͚ͩ࡞ͬͯյͤΔ
  3. ͱΓ֮͋͑ͣ͑ͯ΄͍͜͠ͱ • ʮΠϝʔδʯͱʮίϯςφʯ • Πϝʔδɿ ࣮ߦͰ͖ΔϑΝΠϧ (ͷΑ͏ͳ΋ͷ) • ίϯςφɿ ࣮ߦதͷϓϩηε

    (ͷΑ͏ͳ΋ͷ) • Docker ʹ͍ͭͯߟ͑Δͱ͖ɺ
 Πϝʔδͷ࿩ͳͷ͔ίϯςφͷ࿩ͳͷ͔
 Λҙࣝͨ͠΄͏͕͍͍
  4. Πϝʔδ 1 ίϯςφ run commit Πϝʔδ 2 ʮΠϝʔδ 1ʯ͔Β ίϯςφΛ࡞੒࣮ͯ͠ߦ͢Δ

    ίϯςφʹมߋΛՃ͑Δ (ϞδϡʔϧΛΠϯετʔϧ͢Δ౳) มߋΛՃ͑ͨίϯςφΛ ʮΠϝʔδ 2ʯͱ͍͏໊લͰอଘ͢Δ ※ ࣮ࡍʹΠϝʔδΛ࡞Δࡍʹ͸ commit Λ௚઀࣮ߦ͢Δ͜ͱ͸ͳ͘ɺ
 ɹ୅ΘΓʹ Dockerfile Λهड़͢Δͷ͕ͩɺͦΕʹ͍ͭͯ͸ࠓճ͸ׂѪ
  5. Πϝʔδͷछྨ • ެࣜΠϝʔδ • DockerHub Ͱެ։͞Ε͍ͯΔ • Ubuntu ͱ͔ Ruby

    ͱ͔ MySQL ͱ͔ • ඇެࣜΠϝʔδ • ୭͔͕࡞ͬͨΠϝʔδ • DockerHub ΍ͦͷଞͷϨδετϦ • ϓϥΠϕʔτͳΠϝʔδ • ࣗ෼ͰϏϧυͨ͠Πϝʔδ
  6. Πϝʔδ͸มߋࠩ෼ͷੵΈॏͶ ubuntu:16.04 php:7 scratch wordpress:4 Ubuntu ΛΠϯετʔϧ PHP ΛΠϯετʔϧ WordPress

    ΛΠϯετʔϧ ↑ ΠϝʔδΛ࢖͏ (ίϯςφΛ࡞Δ) ਓ͸ϨΠϠΛҙࣝ͢Δඞཁ͸ͳ͍ ʮΑ͘Θ͔ΒΜ͚Ͳ WordPress ͕ಈ͘Πϝʔδʯͱͯ͠࢖͑Δ
  7. ศརͳࣄྫɿ GitLab (1/2) • (ࣾ಺ GitLab ͸ Docker Ͱಈ͍ͯΔ) •

    ैདྷͷ GitLab Πϯετʔϧํ๏ • Ruby, Node, Nginx, PostgreSQL, Redis,
 Sidekiq, GitLab ຊମ ΛΠϯετʔϧ • ͦΕͧΕΛద੾ʹಈ࡞͢ΔΑ͏ʹઃఆ • ͭΒ͍
  8. ศརͳࣄྫɿ GitLab (2/2) • Docker Λ࢖ͬͨ GitLab Πϯετʔϧํ๏ • GitLab

    ެࣜΠϝʔδΛ pull ͯ͘͠Δ • σʔλΛอଘ͢ΔͨΊͷϘϦϡʔϜΛ༻ҙ • ίϯςφΛىಈ͢Δ • ؆୯ !!! • ʮΑ͘Θ͔ΒΜ͚Ͳ GitLab ͕ಈ͘Πϝʔδʯ
 ͕࢖͑Δ → ϙʔλϏϦςΟ
  9. Docker Ͱ৭ʑಈ͍͍ͯΔ • μογϡϘʔυ (80) • TensorFlow Notebook (18888) •

    DataScience Notebook (28888) • PySpark Notebook (38888) • PostgreSQL (5432)
  10. ྫɿ ๭෼ੳҊ݅ • GPU αʔόͷ Jupyter Ͱ෼ੳ͍ͯͨ͠ • ؀ڥΛ࠶ݱ͢ΔεΫϦϓτΛॻ͖ͳ͕Β෼ੳͨ͠ •

    Ϟδϡʔϧͷڍಈ͕͓͔͘͠ͳͬͨͱ͖ʹ
 ʮίϯςφյͯ͠࠷ॳ͔Β࡞Γ௚ͯ͠ΈΑ͏ʯ
 Λ͙͢ʹ࣮ߦͯ͠௚ͤͨ • ೲ඼෺ʹॳظઃఆεΫϦϓτΛೖΕΔ͚ͩͰ
 ͦΕ͕؀ڥߏஙखॱॻʹͳͬͨ