pytorch.kr

pytorch.kr

πŸ‡°πŸ‡·νŒŒμ΄ν† μΉ˜ ν•œκ΅­ μ‚¬μš©μž λͺ¨μž„ ν™ˆνŽ˜μ΄μ§€ μ €μž₯μ†Œμž…λ‹ˆλ‹€. (Repo. for PyTorch Korea User Group websiteπŸ‡°πŸ‡·)

νŒŒμ΄ν† μΉ˜ ν•œκ΅­ μ‚¬μš©μž λͺ¨μž„ ν™ˆνŽ˜μ΄μ§€

κ°œμš”

νŒŒμ΄ν† μΉ˜ ν•œκ΅­ μ‚¬μš©μž λͺ¨μž„ ν™ˆνŽ˜μ΄μ§€ μ €μž₯μ†Œμ— μ˜€μ‹  것을 ν™˜μ˜ν•©λ‹ˆλ‹€!
νŒŒμ΄ν† μΉ˜ ν•œκ΅­ μ‚¬μš©μž λͺ¨μž„ ν™ˆνŽ˜μ΄μ§€λŠ” PyTorch 곡식 ν™ˆνŽ˜μ΄μ§€ μ €μž₯μ†Œλ₯Ό λ³΅μ œν•˜μ—¬ λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€.
ν™ˆνŽ˜μ΄μ§€ λΉŒλ“œλ₯Ό μœ„ν•΄ Jekyllκ³Ό Bootstrap 등을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

λΉŒλ“œν•˜κΈ°

이 μ €μž₯μ†Œλ₯Ό λΉŒλ“œν•˜κΈ° μœ„ν•΄ ν•„μš”ν•œ 절차λ₯Ό μ•ˆλ‚΄ν•©λ‹ˆλ‹€.

ν•„μš” 도ꡬ

이 μ €μž₯μ†Œλ₯Ό λΉŒλ“œν•˜κΈ° μœ„ν•΄μ„œλŠ” μ•„λž˜ λ„κ΅¬λ“€μ˜ ν•„μš”ν•©λ‹ˆλ‹€.

macOSμ—μ„œ homebrewλ₯Ό μ‚¬μš©ν•˜μ‹ λ‹€λ©΄, μ•„λž˜ λͺ…λ Ήμ–΄λ‘œ μ„€μΉ˜ν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€:

  brew install rbenv ruby-build nvm

mac os μ—μ„œ rbenv 와 nvm 을 졜초 μ„€μΉ˜ν•œ μ΄ν›„μ—λŠ” μ‰˜ μ„€μ •νŒŒμΌμ„ μ—…λ°μ΄νŠΈ ν•΄μ•Όν•©λ‹ˆλ‹€.

# κ΄€λ ¨ μ„€μ • μ—…λ°μ΄νŠΈ
  cat <<EOT >> ~/.zshrc
eval "$(rbenv init - zsh)"
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion
EOT
  # μ„€μ • 반영
  source ~/.zshrc # ν˜Ήμ€ μž¬μ‹œμž‘

λΉŒλ“œ 절차

ruby 및 bundler, ν•„μš” νŒ¨ν‚€μ§€ μ„€μΉ˜

μ•„λž˜ λͺ…λ Ήμ–΄λ‘œ 이 μ €μž₯μ†Œμ—μ„œ ν•„μš”λ‘œ ν•˜λŠ” ruby 버전에 맞좰 ruby와 bundler, ν•„μš” νŒ¨ν‚€μ§€λ“€μ„ μ„€μΉ˜ν•©λ‹ˆλ‹€.

  rbenv install `cat .ruby-version`   # ruby μ„€μΉ˜
  gem install bundler -v 2.3.13       # bundler μ„€μΉ˜
  rbenv rehash
  bundle install                      # ν•„μš” νŒ¨ν‚€μ§€ μ„€μΉ˜
  rbenv rehash

2022λ…„ 7μ›” 17일 ν˜„μž¬ apple silicon μ—μ„œ rbenv install μ§„ν–‰μ‹œ μ•„λž˜μ™€ 같은 문제둜 μ„€μΉ˜κ°€ μ•ˆλ˜λŠ” λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€. https://github.com/openssl/openssl/issues/18720

clang  -Iinclude -arch arm64 -O3 -Wall -D_REENTRANT -DZLIB -DZLIB_SHARED -DNDEBUG -I/Users/jlee/.rbenv/versions/2.7.4/include  -MMD -MF test/versions.d.tmp -MT test/versions.o -c -o test/versions.o test/versions.c
clang  -Iinclude -arch arm64 -O3 -Wall -D_REENTRANT -DZLIB -DZLIB_SHARED -DNDEBUG -I/Users/jlee/.rbenv/versions/2.7.4/include  -MMD -MF test/wpackettest.d.tmp -MT test/wpackettest.o -c -o test/wpackettest.o test/wpackettest.c
test/v3ext.c:201:24: error: implicitly declaring library function 'memcmp' with type 'int (const void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
       if (!TEST_true(memcmp(ip1->data, ip2->data, ip1->length) <= 0))

μ•„λž˜μ™€ 같이 OPENSSL_CFLAGS λ₯Ό μ„€μ •ν•΄μ„œ ν•΄κ²°κ°€λŠ₯ν•©λ‹ˆλ‹€.

 OPENSSL_CFLAGS=-Wno-error=implicit-function-declaration rbenv install `cat .ruby-version`

node.js 및 ν•„μš” νŒ¨ν‚€μ§€ μ„€μΉ˜

μ•„λž˜ λͺ…λ Ήμ–΄λ‘œ 이 μ €μž₯μ†Œμ—μ„œ ν•„μš”λ‘œ ν•˜λŠ” node.js 버전에 맞좰 node.js 및 yarn, ν•„μš” νŒ¨ν‚€μ§€λ“€μ„ μ„€μΉ˜ν•©λ‹ˆλ‹€.

  nvm install       # node.js μ„€μΉ˜
  nvm use           # node.js 버전 적용
  npm install yarn  # νŒ¨ν‚€μ§€ 도ꡬ μ„€μΉ˜
  yarn install      # ν•„μš” νŒ¨ν‚€μ§€ μ„€μΉ˜

ν™ˆνŽ˜μ΄μ§€ λΉŒλ“œ

μ•„λž˜ λͺ…λ Ήμ–΄λ‘œ jekyll을 μ‚¬μš©ν•˜μ—¬ λΉŒλ“œν•©λ‹ˆλ‹€. λ³€κ²½ 사항을 μ‹€μ‹œκ°„μœΌλ‘œ ν™•μΈν•˜λ €λ©΄ make build λŒ€μ‹  make serve λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•˜λ©΄ λ©λ‹ˆλ‹€.

  make build    # λΉŒλ“œ 결과물은 `./_site` 디렉토리에 μ €μž₯λ©λ‹ˆλ‹€.
  # make serve

λ°°ν¬ν•˜κΈ°

νŒŒμ΄ν† μΉ˜ ν•œκ΅­ μ‚¬μš©μž λͺ¨μž„ ν™ˆνŽ˜μ΄μ§€λŠ” GitHub Pagesλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.
ν™ˆνŽ˜μ΄μ§€λŠ” GitHub Actionsλ₯Ό μ‚¬μš©ν•˜μ—¬ μžλ™μœΌλ‘œ λΉŒλ“œ 및 gh-pages λΈŒλžœμΉ˜μ— λ°°ν¬λ©λ‹ˆλ‹€.

κΈ°μ—¬ν•˜κΈ°

ν™ˆνŽ˜μ΄μ§€μ—μ„œ 잘λͺ»λœ λ‚΄μš© λ˜λŠ” λ³€κ²½ / μΆ”κ°€ν•˜κ³  싢은 λ‚΄μš©μ΄ μžˆλ‹€λ©΄ 이 μ €μž₯μ†Œμ— κΈ°μ—¬ν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€.
κΈ°μ—¬ν•˜κΈ° λ¬Έμ„œλ₯Ό μ°Έκ³ ν•΄μ£Όμ„Έμš”.