File size: 617 Bytes
fd63db6
 
b8d230f
fd63db6
 
 
 
 
 
b8d230f
fd63db6
 
 
 
 
 
b8d230f
fd63db6
 
 
 
 
7a59e7a
 
 
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
FROM python:3.11.0

# Install git-lfs and update
RUN apt-get update && apt-get install -y git-lfs && git lfs install

# Create non-root user
RUN useradd -m -u 1000 user
WORKDIR /app

# Copy and install dependencies
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy application code
COPY --chown=user . /app

# Pull LFS content (if any)
RUN git lfs pull || echo 'No LFS to pull'

# Expose Flask port
EXPOSE 7860

# Run textblob corpora download at container startup 
CMD ["sh", "-c", "python -m nltk.downloader punkt punkt_tab && python app.py"]