Spaces:
Sleeping
Sleeping
Auto commit at 09-2025-08 1:55:36
Browse files- Dockerfile +5 -1
- 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)
|