gbrabbit commited on
Commit
34d0a60
Β·
1 Parent(s): 6556484

Auto commit at 09-2025-08 1:55:36

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -1
  2. app_huggingface.py +2 -0
Dockerfile CHANGED
@@ -37,7 +37,7 @@ RUN python -c "import nltk; nltk.download('punkt'); nltk.download('punkt_tab');
37
  COPY . .
38
 
39
  # ν•„μš”ν•œ 디렉토리 생성
40
- RUN mkdir -p /app/data /app/logs /app/models /app/uploads /app/vector_stores /app/temp /app/cache/transformers /app/cache/huggingface /app/cache/easyocr /app/cache/ocr_models
41
 
42
  # κΆŒν•œ μ„€μ • - λͺ¨λ“  μΊμ‹œ 및 데이터 디렉토리에 μ“°κΈ° κΆŒν•œ λΆ€μ—¬
43
  RUN chmod +x /app/*.py
@@ -45,9 +45,13 @@ RUN chmod -R 777 /app/cache
45
  RUN chmod -R 777 /app/data
46
  RUN chmod -R 777 /app/logs
47
  RUN chmod -R 777 /app/uploads
 
 
48
  RUN chmod -R 777 /app/temp
49
  RUN chmod -R 777 /app/cache/easyocr
50
  RUN chmod -R 777 /app/cache/ocr_models
 
 
51
 
52
  # EasyOCR 및 기타 라이브러리λ₯Ό μœ„ν•œ ν™˜κ²½ λ³€μˆ˜ μ„€μ •
53
  ENV EASYOCR_MODULE_PATH=/app/cache/easyocr
 
37
  COPY . .
38
 
39
  # ν•„μš”ν•œ 디렉토리 생성
40
+ RUN mkdir -p /app/data /app/logs /app/models /app/uploads /app/vector_stores /app/orc_models /app/temp /app/cache/transformers /app/cache/huggingface /app/cache/easyocr /app/cache/ocr_models
41
 
42
  # κΆŒν•œ μ„€μ • - λͺ¨λ“  μΊμ‹œ 및 데이터 디렉토리에 μ“°κΈ° κΆŒν•œ λΆ€μ—¬
43
  RUN chmod +x /app/*.py
 
45
  RUN chmod -R 777 /app/data
46
  RUN chmod -R 777 /app/logs
47
  RUN chmod -R 777 /app/uploads
48
+ RUN chmod -R 777 /app/vector_stores
49
+ RUN chmod -R 777 /app/orc_models
50
  RUN chmod -R 777 /app/temp
51
  RUN chmod -R 777 /app/cache/easyocr
52
  RUN chmod -R 777 /app/cache/ocr_models
53
+ RUN chmod -R 777 /app/cache/transformers
54
+ RUN chmod -R 777 /app/cache/huggingface
55
 
56
  # EasyOCR 및 기타 라이브러리λ₯Ό μœ„ν•œ ν™˜κ²½ λ³€μˆ˜ μ„€μ •
57
  ENV EASYOCR_MODULE_PATH=/app/cache/easyocr
app_huggingface.py CHANGED
@@ -102,5 +102,7 @@ if __name__ == "__main__":
102
  except KeyboardInterrupt:
103
  logger.info("πŸ‘‹ μ„œλ²„ μ’…λ£Œ")
104
  except Exception as e:
 
 
105
  logger.error(f"❌ μ‹€ν–‰ 였λ₯˜: {e}")
106
  sys.exit(1)
 
102
  except KeyboardInterrupt:
103
  logger.info("πŸ‘‹ μ„œλ²„ μ’…λ£Œ")
104
  except Exception as e:
105
+ logger.error(f"❌ μ‹€ν–‰ 였λ₯˜: {e}")
106
+ sys.exit(1)
107
  logger.error(f"❌ μ‹€ν–‰ 였λ₯˜: {e}")
108
  sys.exit(1)