File size: 951 Bytes
edc5316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
32
33
# Use the latest official Python image as the base
FROM python:3.11-slim

# Set the working directory to the root directory
WORKDIR /

# Install system dependencies required to build some Python packages
RUN apt-get update && apt-get install -y \
    python3-pip \
    python3-dev \
    cmake \
    libfreetype6-dev \
    libxft-dev \
    libpcre2-dev \
    liblzma-dev \
    && apt-get clean

# Copy requirements.txt from the project root to the container's root directory
COPY requirements.txt /requirements.txt

# Install Python dependencies from requirements.txt
RUN pip3 install --no-cache-dir -r /requirements.txt

# Copy the application code and data to their respective directories
COPY app /app
COPY data_source /data_source

# Expose the port Streamlit will run on
EXPOSE 7860

# Command to run the Streamlit app
CMD ["streamlit", "run", "app/app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]