File size: 797 Bytes
bad2faf
 
8115369
bad2faf
8115369
 
bad2faf
8115369
 
bad2faf
 
8115369
 
 
 
bad2faf
8115369
bad2faf
8115369
bad2faf
 
8115369
 
bad2faf
8115369
 
bad2faf
 
8115369
bad2faf
 
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
# Use Python 3.10 because torch 2.1.0 doesn't support 3.13
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install system dependencies needed for sentencepiece + builds
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    pkg-config \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements and source files
COPY requirements.txt ./
COPY . .

# Upgrade pip and install Python dependencies
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt

# Expose Streamlit port
EXPOSE 8501

# Healthcheck (optional but good practice)
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1

# Start your Streamlit app
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]