File size: 874 Bytes
36d1a77
0abb8bb
 
 
2feb229
 
 
 
2adf1ee
 
2feb229
0abb8bb
c794bad
 
 
5a3dc73
2adf1ee
 
 
2feb229
 
2adf1ee
0abb8bb
fd8e32d
0abb8bb
 
2adf1ee
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
FROM python:3.9-slim

WORKDIR /app

# Create nltk_data directory with proper permissions
RUN mkdir -p /usr/local/share/nltk_data && \
    chmod -R 777 /usr/local/share/nltk_data

# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Create directory structure and copy all static files
RUN mkdir -p /app/streamlit/static
COPY static/* /app/streamlit/static/

# Copy the rest of the application
COPY . .

# Download NLTK data to the correct location with proper permissions
RUN python -c "import nltk; nltk.data.path.append('/usr/local/share/nltk_data'); nltk.download('popular', download_dir='/usr/local/share/nltk_data')"

# Expose the port that Streamlit will use
EXPOSE 8501

# Run the Streamlit app
CMD ["streamlit", "run", "streamlit/main.py", "--server.address=0.0.0.0", "--server.port=8501"]