File size: 715 Bytes
bc5981b
705d8f2
f7525b3
 
 
 
705d8f2
f7525b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d5cfe18
705d8f2
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.11-slim

RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

COPY --chown=user:user src/ ./src
COPY --chown=user:user requirements.txt .
COPY --chown=user:user images/ ./images/ 
COPY --chown=user:user .streamlit/ ./.streamlit/

ENV NLTK_DATA=$HOME/nltk_data
ENV ANONYMIZED_TELEMETRY=False

RUN pip install --no-cache-dir --user -r requirements.txt

# Create NLTK data directory in user home
RUN mkdir -p $HOME/nltk_data

# Download NLTK data during build
RUN python -c "import nltk; nltk.download('punkt_tab', download_dir='$HOME/nltk_data')"

CMD ["streamlit", "run", "src/run.py", "--server.port=8501", "--server.address=0.0.0.0"]