File size: 893 Bytes
08fce02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
34
35
36
# ----- Base image -----
FROM python:3.11-slim

# ----- Set working directory -----
WORKDIR /home/user/app

# ----- Install system dependencies -----
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    git-lfs \
    ffmpeg \
    libsm6 \
    libxext6 \
    libgl1-mesa-glx \
    cmake \
    rsync \
    && rm -rf /var/lib/apt/lists/*

# ----- Copy app files -----
COPY ./ /home/user/app

# ----- Upgrade pip and install Python dependencies -----
RUN python -m pip install --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt

# ----- Streamlit config -----
RUN mkdir -p /home/user/.streamlit
COPY .streamlit/config.toml /home/user/.streamlit/config.toml

# ----- Expose port -----
EXPOSE 8501

# ----- Run the app -----
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.headless=true"]