Slide 1

Slide 1 text

٣੗੉ցܳ ਤೠ Docker ੑޙ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 1

Slide 2

Slide 2 text

೯झݽ 7ਘ 3઱ର 2015. 7. 18. ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 2

Slide 3

Slide 3 text

@nacyo_t ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 3

Slide 4

Slide 4 text

TOC • о࢚ച੄ द؀ • Docker ݍࠁӝ • Docker ੉೧ೞӝ • ஶప੉ցо ೙ਃೠ ੉ਬ • Wordpress / Deepdream प೯ೞӝ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 4

Slide 5

Slide 5 text

द؀ח ߄ঠ൒۽ о࢚ച ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 5

Slide 6

Slide 6 text

ೞ٘ਝয о࢚ച ࣗ೐౟ਝয۽ ҳഅػ о࢚੄ ೞ٘ਝয ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 6

Slide 7

Slide 7 text

ޛܻ੸ ೞ٘ਝয ਤ੄ ࣗ೐౟ਝয۽ ҳഅػ ೞ٘ਝয ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 7

Slide 8

Slide 8 text

VirtualBox 1 Parallels 2 VMWare 3 3 http://www.vmware.com/ 2 http://www.parallels.com/products/desktop/ 1 https://www.docker.com/ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 8

Slide 9

Slide 9 text

੉޷ ੌ࢚੸ੋ ӝࣿ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 9

Slide 10

Slide 10 text

ੋ೐ۄझ౟۟୊ ೞ٘ਝয ౵ಞച ୭ࣗച ࢲߡ হח ࢎޖप Ѣ੄ ޖೠೠ ഛ੢ࢿ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 10

Slide 11

Slide 11 text

ӒܻҊ ࢜۽੉ ١੢ೠ ੤ߊѼػ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 11

Slide 12

Slide 12 text

Container? ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 12

Slide 13

Slide 13 text

Docker1 1 https://www.docker.com/ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 13

Slide 14

Slide 14 text

Hello, Docker ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 14

Slide 15

Slide 15 text

рױೠ ৘ઁ xaos ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 15

Slide 16

Slide 16 text

ղ ஹೊఠ - xaosо হח ജ҃ $ xaos command not found: xaos $ which xaos xaos not found ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 16

Slide 17

Slide 17 text

ਗѺ ࢲߡ - Ubuntuীࢲ ࢸ஖ೞӝ $ apt-get update $ apt-get install xaos $ xaos ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 17

Slide 18

Slide 18 text

׮द ղஹೊఠ - xaosо হח ജ҃ $ xaos command not found: xaos $ docker run --rm -it wernight/funbox : <8> ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 18

Slide 19

Slide 19 text

Demo ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 19

Slide 20

Slide 20 text

೐۽ࣁझо प೯غח ف о૑ ജ҃ 1. ղ ஹೊఠ੄ ജ҃ 2. xaosо ࢸ஖ػ Docker ੉޷૑੄ ജ҃ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 20

Slide 21

Slide 21 text

ղ ஹೊఠ੄ ജ҃ $ which xaos xaos not found ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 21

Slide 22

Slide 22 text

xaosо ࢸ஖ػ Docker ੉޷૑੄ ജ҃ $ # ղ ஹೊఠ੄ ജ҃ $ docker run --rm -it wernight/funbox bash ShellInDockerContainer$ # ஶప੉ց ജ҃ ShellInDockerContainer$ which xaos /usr/bin/xaos ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 22

Slide 23

Slide 23 text

ࣗ೐౟ਝয ಁః૑о ইפۄ ࢸ஖ػ ജ҃ ੗୓ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 23

Slide 24

Slide 24 text

ೞ٘ਝয о࢚ച হח Ѻܻػ ജ҃੄ ೐۽ࣁझ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 24

Slide 25

Slide 25 text

Container! ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 25

Slide 26

Slide 26 text

Ӓېࢲ ؀ױೠ Ѣঠ? ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 26

Slide 27

Slide 27 text

The Future of Everything Link ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 27

Slide 28

Slide 28 text

docker ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 28

Slide 29

Slide 29 text

docker ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 29

Slide 30

Slide 30 text

docker ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 30

Slide 31

Slide 31 text

docker ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 31

Slide 32

Slide 32 text

٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 32

Slide 33

Slide 33 text

प੹ਵ۽ ߓ਋ח Dokcer ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 33

Slide 34

Slide 34 text

੉޷૑ ೐۽ࣁझܳ प೯ೞӝ ਤ೧ ޷ܻ ળ࠺ػ ജ҃ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 34

Slide 35

Slide 35 text

ஶప੉ց ੉޷૑۽ࠗఠ प೯ػ ೐۽ࣁझ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 35

Slide 36

Slide 36 text

ਗद੸ੋ ஶప੉ց ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 36

Slide 37

Slide 37 text

chroot ೐۽ࣁझ੄ rootܳ ࣘ੉੗ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 37

Slide 38

Slide 38 text

Container = chroot + @ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 38

Slide 39

Slide 39 text

Docker ੉޷૑ ҙܻ ੋఠಕ੉झ ஶప੉ց ҙܻ ੋఠಕ੉झ ҅கചػ ౵ੌ दझమ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 39

Slide 40

Slide 40 text

Docker ࢸ஖ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 40

Slide 41

Slide 41 text

Docker ࢸ஖ • ֿܻझ : apt-get / yumਸ ੉ਊ೧ ࢸ஖ • ਦب/OSX : boot2docker۽ ࢸ஖ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 41

Slide 42

Slide 42 text

boot2docker http://boot2docker.io/ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 42

Slide 43

Slide 43 text

boot2docker (1) • Dockerח ֿܻझ ழօ݅ ૑ਗ • ਦب/OSXীࢲח Dockerܳ ૑ਗೞ૑ ঋ਺ • ٮۄࢲ ֿܻझ о࢚ ݠन੉ ೙ਃ • boot2dokcer = CoreLinux on VirtualBox ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 43

Slide 44

Slide 44 text

boot2docker (2) • о࢚ݠनਸ ॳݶࢲө૑ Dockerܳ ॄঠೞա? • ࢿמ ݶীࢲח ࠙ݺ൤ ܻࠛೣ • ੉޷૑/ஶప੉ց ѐ֛਷ ৈ੹൤ ъ۱ೣ • पߓನীࢲח ௿ۄ਋٘ীࢲ ֿܻझ ݠनਸ ࢎਊ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 44

Slide 45

Slide 45 text

Docker ਗܻ ੉೧ೞӝ from ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 45

Slide 46

Slide 46 text

boot2dokcer ਗܻ ੉೧ೞӝ from ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 46

Slide 47

Slide 47 text

boot2docker ࢸ஖ 1. ݢ੷ boot2docker ীࢲ OS߹ ੋझ఺۞ ׮਍۽٘ 2. ੋझ఺۞۽ ࢸ஖ • docker৬ boot2docker ݺ۸যо ࢸ஖ 3. ఠ޷օীࢲ boot2docker init प೯ • CoreLinux о࢚ݠन ࢤࢿ 4. boot2docker up प೯ 5. eval $(boot2docker shellinit) प೯ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 47

Slide 48

Slide 48 text

eval $(boot2docker shellinit) • docker ݺ۸য۽ о࢚ݠन੄ ؘހਸ ࢎਊೞب۾ ૑੿ • docker = Docker Client • о࢚ݠन੄ Docker ؘހ = Docker Server • ݺ۸ਸ ղܻݶ पઁۿ о࢚ݠनীࢲ प೯ • ఠ޷օਸ ࢜۽ ৌ ٸ݃׮ प೯೧ঠೣ • ӈଳ׮ݶ ~/.bashrc ౵ੌਸ ৌয ݔ ٍী ୶о • eval $(boot2docker shellinit) ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 48

Slide 49

Slide 49 text

Docker GUI ੋఠಕ੉झ Kitematic ੉۠ Ѫب ੓যਃ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 49

Slide 50

Slide 50 text

ળ࠺ ৮ܐ! ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 50

Slide 51

Slide 51 text

੉޷૑ܳ ٜ݅যࠁ੗! ࢜۽਍ ജ҃ ੿੄ೞӝ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 51

Slide 52

Slide 52 text

wget੉ ࢸ஖ػ Ubuntu ੉޷૑ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 52

Slide 53

Slide 53 text

docker pull ੉޷૑ܳ ߉ইয়ח ݺ۸য $ docker pull $ docker pull ubuntu:14.04 ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 53

Slide 54

Slide 54 text

docker images بழীࢲ ࢎਊоמೠ ੉޷૑ ݾ۾ $ docker images REPOSITORY TAG IMAGE ID ... ubuntu 14.04 d2a0ecffe6fa ... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 54

Slide 55

Slide 55 text

docker run ੉޷૑۽ࠗఠ ஶప੉ց प೯ೞӝ $ docker run -it # ubuntu:14.04 ੉޷૑ীࢲ bash ݺ۸যܳ प೯ $ # <- ৈӝח ഐझ౟੄ ࣕ $ docker run -it ubuntu:14.04 bash root@8b7290edaa5c:/$ # <- ࢜۽਍ ജ҃ উ੄ ࣕ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 55

Slide 56

Slide 56 text

Conatiner ID 8b7290edaa5c ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 56

Slide 57

Slide 57 text

docker ps प೯઺ੋ ஶప੉ց ݾ۾ # ഐझ౟੄ ׮ܲ ࣕীࢲ प೯ $ docker ps CONTAINER ID IMAGE COMMAND ... 8b7290edaa5c ubuntu:14.04 "bash" ... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 57

Slide 58

Slide 58 text

ஶప੉ցীࢲ wget ࢸ஖ೞӝ root@8b7290edaa5c:/# wget bash: wget: command not found root@8b7290edaa5c:/# apt-get update root@8b7290edaa5c:/# apt-get install -y wget root@8b7290edaa5c:/# wget wget: missing URL Usage: wget [OPTION]... [URL]... Try `wget --help' for more options. ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 58

Slide 59

Slide 59 text

docker diff प೯ೠ ੉޷૑۽ࠗఠ അ੤ ஶప੉ց੄ ߸҃ࢎ೦ ୹۱ $ docker diff # ഐझ౟੄ ׮ܲ ࣕীࢲ प೯ $ docker diff 8b7290edaa5c A /.wh..wh.plnk/101.138481 # ౵ੌ ୶о A /.wh..wh.plnk/361.138462 # ౵ੌ ୶о C /etc # ߸҃ ࢎ೦ A /etc/ca-certificates # ౵ੌ ୶о ... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 59

Slide 60

Slide 60 text

docker commit प೯ೠ ੉޷૑۽ࠗఠ അ੤ ஶప੉ց੄ ߸҃ࢎ೦ ੷੢ $ docker commit $ docker commit 8b7290 nacyot/wget:latest 9ea5dab42924a2a7cbb4a... # ࢜۽ ࢤࢿػ ੉޷૑ ID $ docker images REPOSITORY TAG IMAGE ID ... ubuntu 14.04 d2a0ecffe6fa ... nacyot/wget latest 9ea5dab42924 ... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 60

Slide 61

Slide 61 text

nacyot/wget प೯೧ࠁӝ $ docker run -it ubuntu:14.04 bash root@c30e6fa29017:/# wget bash: wget: command not found $ docker run -it nacyot/wget bash root@f87cd323f346:/# wget wget: missing URL Usage: wget [OPTION]... [URL]... Try `wget --help' for more options. ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 61

Slide 62

Slide 62 text

Dockerfile ੉޷૑ ࠽٘ җ੿ਸ ౵ੌ۽ ӝࣿ FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y wget ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 62

Slide 63

Slide 63 text

docker build Dockerfile۽ ੉޷૑ ࠽٘ೞӝ $ docker build -t $ ls Dockerfile $ dokcer build -t nacyot/wget:latest . ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 63

Slide 64

Slide 64 text

Demo ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 64

Slide 65

Slide 65 text

؊ ҕࠗೞӝ بழ(Docker) ౚషܻ঴ : Ӭ ӣী ߓನө૑ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 65

Slide 66

Slide 66 text

ஶప੉ցо ೙ਃೠ ੉ਬ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 66

Slide 67

Slide 67 text

ࠁಞ੸ ޛܻߨ஗ ঱ઁ য٣ࢲա ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 67

Slide 68

Slide 68 text

ஹೊఠ੄ ജ҃਷ ࠁಞ੸੉૑ ঋ׮ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 68

Slide 69

Slide 69 text

ౠࣻೠ ജ҃ ౠ੿ ೞ٘ਝয ౠ੿ OS ౠ੿ द੼੄ दझమ ࢸ੿ ࢸ஖ػ ࣗ೐౟ਝযٜ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 69

Slide 70

Slide 70 text

ஹೊఠܳ ܻࣻೞח о੢ ੌ߈੸ੋ ঌҊ્ܻ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 70

Slide 71

Slide 71 text

੤ࠗ౴ Ӓېب উ غݶ... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 71

Slide 72

Slide 72 text

੤ࢸ஖ Ӓېب উ غݶ... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 72

Slide 73

Slide 73 text

OS ੤ࢸ஖ ਦب਋ ׮द ӭই. ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 73

Slide 74

Slide 74 text

࢚క ҙܻח ਗې য۵׮ ࢲߡب য۵׮ ؘझ௼఑ب ڙэ੉ য۵׮ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 74

Slide 75

Slide 75 text

ӵՖೠ ജ҃ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 75

Slide 76

Slide 76 text

Dockerfile੉ۆ ӵՖೠ ജ҃ਵ۽ࠗఠ গ೒ܻா੉࣌ प೯ ജ҃ө૑ ୭ױ҃۽ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 76

Slide 77

Slide 77 text

੉޷૑ = ੘زغח ࢚క ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 77

Slide 78

Slide 78 text

10ݺ੄ ݓ࠘ 10ѐ੄ ࢲ۽ ׮ܲ ജ҃ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 78

Slide 79

Slide 79 text

ೞա੄ ੉޷૑ ೦࢚ э਷ ജ҃ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 79

Slide 80

Slide 80 text

Docker is ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 80

Slide 81

Slide 81 text

Docker is ࡴ ݏ਷ chroot ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 81

Slide 82

Slide 82 text

Docker is ୡъ۱ೠ ನఠ࠶ জ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 82

Slide 83

Slide 83 text

੤അࢿ ੉޷૑۽ ٜ݅ݶ ҕਬоמ ৈӝࢲ غݶ, ੷ӝࢲب ؽ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 83

Slide 84

Slide 84 text

Docker hub • بழ ҕध ੉޷૑ ҕਬܳ ਤೠ ࢲ࠺झ • ׮নೠ ੉޷૑о ޷ܻ ળ࠺غয ੓਺ • ӝࠄ ਍৔୓ઁ : Ubuntu, CentOS, ... • CMS: Wordpress, Ghost, drupal, ... • Ipython, Jira, Gitlab, Deepdream, ... • docker run ݺ۸য ೞաݶ प೯ оמ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 84

Slide 85

Slide 85 text

Wordpress դ੉ب: ઺ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 85

Slide 86

Slide 86 text

Wordpress on Docker $ docker run --name wp-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql $ docker run --link wp-mysql:mysql -p 8000:80 -d wordpress ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 86

Slide 87

Slide 87 text

http://192.168.59.103:8000 ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 87

Slide 88

Slide 88 text

Deepdream from դ੉ب: ࢚ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 88

Slide 89

Slide 89 text

Deepdream • Deep Learningਸ ా೧ ஹೊఠ੄ ׀ਵ۽ ࠁח ࣁ҅ • Deep Learning ೐ۨ੐ਕ௼ caffeܳ ࢎਊ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 89

Slide 90

Slide 90 text

աب ೠ ߣ ೧ࠁ੗ Deepdream ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 90

Slide 91

Slide 91 text

Ӓۢ ݢ੷ caffeܳ ࢸ஖೧ŷ..... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 91

Slide 92

Slide 92 text

OS X Installation We highly recommend using the Homebrew package manager. Ideally you could start from a clean /usr/local to avoid conflicts. In the following, we assume that you’re using Anaconda Python and Homebrew. CUDA: Install via the NVIDIA package that includes both CUDA and the bundled driver. CUDA 7 is strongly suggested. Older CUDA require libstdc++ while clang++ is the default compiler and libc++ the default standard library on OS X 10.9+. This disagreement makes it necessary to change the compilation settings for each of the dependencies. This is prone to error. Library Path: We find that everything compiles successfully if $LD_LIBRARY_PATH is not set at all, and $DYLD_FALLBACK_LIBRARY_PATH is set to provide CUDA, Python, and other relevant libraries (e.g. /usr/local/cuda/lib:$HOME/anaconda/lib:/usr/local/lib:/usr/lib). In other ENV settings, things may not work as expected. General dependencies brew install -vd snappy leveldb gflags glog szip lmdb # need the homebrew science source for OpenCV and hdf5 brew tap homebrew/science brew install hdf5 opencv If using Anaconda Python, a modification to the OpenCV formula might be needed Do brew edit opencv and change the lines that look like the two lines below to exactly the two lines below. -DPYTHON_LIBRARY=#{py_prefix}/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=#{py_prefix}/include/python2.7 If using Anaconda Python, HDF5 is bundled and the hdf5 formula can be skipped. Remaining dependencies, with / without Python # with Python pycaffe needs dependencies built from source brew install --build-from-source --with-python -vd protobuf brew install --build-from-source -vd boost boost-python # without Python the usual installation suffices brew install protobuf boost BLAS: already installed as the Accelerate / vecLib Framework. OpenBLAS and MKL are alternatives for faster CPU computation. Python (optional): Anaconda is the preferred Python. If you decide against it, please use Homebrew. Check that Caffe and dependencies are linking against the same, desired Python. Continue with compilation. libstdc++ installation This route is not for the faint of heart. For OS X 10.10 and 10.9 you should install CUDA 7 and follow the instructions above. If that is not an option, take a deep breath and carry on. In OS X 10.9+, clang++ is the default C++ compiler and uses libc++ as the standard library. However, NVIDIA CUDA (even version 6.0) currently links only with libstdc++. This makes it necessary to change the compilation settings for each of the dependencies. We do this by modifying the Homebrew formulae before installing any packages. Make sure that Homebrew doesn’t install any software dependencies in the background; all packages must be linked to libstdc++. The prerequisite Homebrew formulae are boost snappy leveldb protobuf gflags glog szip lmdb homebrew/science/opencv For each of these formulas, brew edit FORMULA, and add the ENV definitions as shown: def install # ADD THE FOLLOWING: ENV.append "CXXFLAGS", "-stdlib=libstdc++" ENV.append "CFLAGS", "-stdlib=libstdc++" ENV.append "LDFLAGS", "-stdlib=libstdc++ -lstdc++" # The following is necessary because libtool likes to strip LDFLAGS: ENV["CXX"] = "/usr/bin/clang++ -stdlib=libstdc++" ... To edit the formulae in turn, run for x in snappy leveldb protobuf gflags glog szip boost boost-python lmdb homebrew/science/opencv; do brew edit $x; done After this, run for x in snappy leveldb gflags glog szip lmdb homebrew/science/opencv; do brew uninstall $x; brew install --build-from-source -vd $x; done brew uninstall protobuf; brew install --build-from-source --with-python -vd protobuf brew install --build-from-source -vd boost boost-python If this is not done exactly right then linking errors will trouble you. Homebrew versioning that Homebrew maintains itself as a separate git repository and making the above brew edit FORMULA changes will change files in your local copy of homebrew’s master branch. By default, this will prevent you from updating Homebrew using brew update, as you will get an error message like the following: $ brew update error: Your local changes to the following files would be overwritten by merge: Library/Formula/lmdb.rb Please, commit your changes or stash them before you can merge. Aborting Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master One solution is to commit your changes to a separate Homebrew branch, run brew update, and rebase your changes onto the updated master. You’ll have to do this both for the main Homebrew repository in /usr/local/ and the Homebrew science repository that contains OpenCV in /usr/local/Library/Taps/homebrew/homebrew-science, as follows: cd /usr/local git checkout -b caffe git add . git commit -m "Update Caffe dependencies to use libstdc++" cd /usr/local/Library/Taps/homebrew/homebrew-science git checkout -b caffe git add . git commit -m "Update Caffe dependencies" Then, whenever you want to update homebrew, switch back to the master branches, do the update, rebase the caffe branches onto master and fix any conflicts: # Switch batch to homebrew master branches cd /usr/local git checkout master cd /usr/local/Library/Taps/homebrew/homebrew-science git checkout master # Update homebrew; hopefully this works without errors! brew update # Switch back to the caffe branches with the formulae that you modified earlier cd /usr/local git rebase master caffe # Fix any merge conflicts and commit to caffe branch cd /usr/local/Library/Taps/homebrew/homebrew-science git rebase master caffe # Fix any merge conflicts and commit to caffe branch At this point, you should be running the latest Homebrew packages and your Caffe-related modifications will remain in place. Done! ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 92

Slide 93

Slide 93 text

٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 93

Slide 94

Slide 94 text

Docker ١౸ ryankennedyio/deepdream $ git clone https://github.com/ryankennedyio/deep-dream-generator.git $ cd deep-dream-generator $ docker run -d \ -p 443:8888 \ -e "PASSWORD=password" \ -v $(pwd):/src \ ryankennedyio/deepdream ... a4ea7d082a79e6251a4 ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 94

Slide 95

Slide 95 text

https://192.168.59.103 ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 95

Slide 96

Slide 96 text

؊ ੗ࣁ൤ ੉೧ೞӝ Running deep dream on Windows and OSX ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 96

Slide 97

Slide 97 text

Gitlab դ੉ب: ୭࢚ ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 97

Slide 98

Slide 98 text

Gitlab? • Github৬ ࠺तೠ ࢸ஖ഋ য়೑ࣗझ Git ഐझ౴ ࢲ࠺झ • ࢲ࠺झب ੓Ҋ, ૒੽ ࢸ஖೧ࢲ ࢎਊೞח Ѫب оמ • ѐߊ੗ীѱب য۰਍ ࢸ஖ • ೠٸ ࢸ஖ೞӝ য۵ӝۨ ੿ಣ੉ ա੓঻਺ • Git, ssh, Database, Redis, Ruby, Rails... ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 98

Slide 99

Slide 99 text

sameersbn/docker-gitlab # Run Postgres Container $ docker run --name gitlab-postgresql -d \ --env 'DB_NAME=gitlabhq_production' \ --env 'DB_USER=gitlab' --env 'DB_PASS=password' \ --volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \ sameersbn/postgresql:9.4-2 # Run Redis Container $ docker run --name gitlab-redis -d \ --volume /srv/docker/gitlab/redis:/var/lib/redis \ sameersbn/redis:latest # Redis Container # Run Gitlab Container $docker run --name gitlab -d \ --link gitlab-postgresql:postgresql --link gitlab-redis:redisio \ --publish 10022:22 --publish 10080:80 \ --env 'GITLAB_PORT=10080' --env 'GITLAB_SSH_PORT=10022' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ sameersbn/gitlab:7.13.3 ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 99

Slide 100

Slide 100 text

Wait 5 minute ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 100

Slide 101

Slide 101 text

http://192.168.59.103:10080 root / 5iveL!fe ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 101

Slide 102

Slide 102 text

Build once, Run anywhere ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 102

Slide 103

Slide 103 text

хࢎ೤פ׮ :) @nacyo_t ٣੗੉ցܳ ਤೠ Docker ੑޙ - nacyot 103