martinofumagalli commited on
Commit
e871064
·
verified ·
1 Parent(s): 7f7663e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV HOME=/app \
4
+ PYTHONUNBUFFERED=1
5
+
6
+ # Dipendenze di sistema per OCR
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ tesseract-ocr tesseract-ocr-eng tesseract-ocr-ita poppler-utils \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /app
12
+
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ COPY . /app
17
+
18
+ RUN mkdir -p /app/.streamlit && \
19
+ printf "[server]\nheadless=true\nenableCORS=false\nmaxUploadSize=200\n" > /app/.streamlit/config.toml
20
+
21
+ EXPOSE 7860
22
+ CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"]