Skip to content
MyRefrigeratorPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

My Refrigerator

Get Started

์ƒํ™ฉ ๋ช…๋ น์–ด
ํ™˜๊ฒฝ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ conda env create -f conda.yaml
ํ™˜๊ฒฝ ๋‚ด๋ณด๋‚ด๊ธฐ conda env export > conda.yaml
ํ™˜๊ฒฝ ์‹คํ–‰ํ•˜๊ธฐ conda activate my-refrigerator
์ฐธ๊ณ ์ž๋ฃŒ

Configs

๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ตฌ์กฐ์˜ ํŒŒ์ผ์ž…๋‹ˆ๋‹ค.

path: "/home/ubuntu/server"

banned_keyword_list: [ '๊ณ ๊ฐ', '๊ฒฐ์ œ', '์นด๋“œ', '์Šน์ธ', '๊ฐ€๋งน์ ', '์ „ํ™”', '๋ฒˆํ˜ธ', '์‚ฌ์—…', 'ํ• ๋ถ€', '๊ฐœ์›”' ]
analysis_keyword_list: [ '๋ฉ”๋‰ด', '๋‹จ๊ฐ€', '์ˆ˜๋Ÿ‰', '๊ธˆ์•ก' ]

api_key: 'API KEY'

DJANGO_CONFIG:
  SECRET_KEY: 'DJANGO SCRET KEY'

  ALLOWED_HOST: [ 'NGINX HOST NAME', '127.0.0.1' ]
  ALLOWED_CORS_ORIGIN: [ 'http://example.com', 'https://example.com' ]

RDS_CONFIG:
  ENGINE: 'RDS ENGINE'
  HOST: 'RDS ADDRESS'
  PORT: 77777
  USER: 'RDS HOST'
  PASSWORD: 'RDS PWD'
  DATABASE_NAME: 'RDS_NAME'

JWT_CONFIG:
  SECRET_KEY: 'JWT SECRET'
  ALGORITHM: 'HS256'

History[New]

# [STEP 1] ๊ฐ€์ƒํ™˜๊ฒฝ ์„ค์ •
apt update -y
apt install python3-venv
python3 -m venv venv

# [STEP 2] ๊ฐ€์ƒํ™˜๊ฒฝ ์ง„์ž…
sourc venv/bin/activate

# [STEP 3] APT ๋ชจ๋“ˆ ์„ค์น˜
apt install libgl1-mesa-glx

apt install tesseract-ocr
apt install tesseract-ocr-eng
apt install tesseract-ocr-kor
apt install libmysqlclient-dev


# [STEP 4] PIP ๋ชจ๋“ˆ ์„ค์น˜
pip install opencv-python
pip install matplotlib
pip install pytesseract

pip install imutils
pip install scipy

pip install python-decouple
pip install django-cors-headers

pip install pydantic

pip install mysqlclient
pip install PyMySQL
pip install PyJWT
pip install PyYaml

History[Legacy]

conda create -n my-refrigerator -y

conda activate my-refrigerator

[after]
pip install opencv-python
pip install matplotlib
conda install -c conda-forge tesseract
conda install tesseract-ocr
conda install libtesseract-dev
pip install pytesseract

pip install imutils
pip install scipy
pip install orig [NOne]

pip install python-decouple
pip install django-cors-headers
pip install djangorestframework [Remove!]
pip install pydantic
pip install psycopg2 [Failure]
pip install psycopg2-binary [Success, instead of psyconpg2]

apt install libmysqlclient-dev [Dependency for mysqlclient]
pip install mysqlclient
pip install PyMySQL
pip install PyJWT

Get Started(Ubuntu Only)

[STEP-1] Python ์„ค์น˜

# apt๋ฅผ ์ตœ์‹ ๋ฒ„์ „์œผ๋กœ ์—…๋ฐ์ดํŠธ
apt update

# pip์„ ์„ค์น˜
# ์‹คํ–‰ ํ›„, python -V๋กœ ํ™•์ธํ•˜๋ฉด Python 2.7.17์ด ๋ณด์ž„
apt install python
apt install python-pip
apt install python3-pip

# python3.8์„ค์น˜
# python3์€ AWS์—์„œ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฏ€๋กœ ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š์„ ๊ฒƒ!!
# ์„ค์น˜ ํ›„, python3.8 -V๋กœ ํ™•์ธํ•˜๋ฉด Python 3.8.0์ด ๋ณด์ž„
# ์„ค์น˜ ํ›„, python -V๋กœ ํ™•์ธํ•˜๋ฉด Python 3.7.0์ด ๋ณด์ž„
apt install python3.8

# ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๊ฒฝ๋กœ ํ™•์ธ
ls -al /usr/bin/python

# ํ•ด๋‹น ๊ฒฝ๋กœ๋ฅผ ๋ณ€๊ฒฝํ•˜๊ธฐ ์œ„ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜
apt install update-alternatives

# ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๋ณ€๊ฒฝ์ด ๊ฐ€๋Šฅํ•œ ๋Œ€์ฒด ํ•ญ๋ชฉ์— /usr/bin/python3.8์„ ์ถ”๊ฐ€
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2

# ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ํ•ญ๋ชฉ์„ /usr/bin/python3.8์œผ๋กœ ๋ณ€๊ฒฝ
# ๋ณ€๊ฒฝ ํ›„, python -V๋กœ ํ™•์ธํ•˜๋ฉด Python 3.8.0์ด ๋ณด์ž„
update-alternatives --config python

# ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๊ฒฝ๋กœ ํ™•์ธ
## lrwxrwxrwx 1 root root 24 Feb 2 06:45 /usr/bin/python -> /etc/alternatives/python
ls -al /usr/bin/python

# Python 3.8.0์„ ๊ธฐ์ค€์œผ๋กœ pip์„ ์—…๋ฐ์ดํŠธ
python -m pip install --upgrade pip

# PIP์œผ๋กœ OpenCV ์„ค์น˜๋ฅผ ์œ„ํ•œ ์ข…์†์„ฑ ๋ชจ๋“ˆ ์„ค์น˜
apt install libgl1-mesa-glx

[STEP-2] CORE ๋ชจ๋“ˆ ์„ค์น˜

# https://tesseract-ocr.github.io/tessdoc/Installation.html
sudo apt install tesseract-ocr -y
sudo apt install libtesseract-dev -y
sudo pip install pytesseract

sudo apt install tesseract-ocr-script-kor

# https://docs.opencv.org/3.4/d2/de6/tutorial_py_setup_in_ubuntu.html
sudo apt install python3-opencv -y

cd <ํ”„๋กœ์ ํŠธ ๊ฒฝ๋กœ>
cp ./assets/tesseract/kor.traineddata /usr/share/tesseract-ocr/4.00/tessdata/kor.traineddata

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages