File size: 732 Bytes
9ebe016
d1b9a93
 
9ebe016
d1b9a93
 
 
 
 
 
 
9ebe016
 
 
 
 
d1b9a93
9ebe016
 
d1b9a93
9ebe016
 
d1b9a93
9ebe016
 
d1b9a93
9ebe016
 
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
# Use Python 3.9 base image
FROM python:3.9-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy all files
COPY . .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Download model during build
RUN python -c "from transformers import AutoTokenizer, AutoModelForSeq2SeqLM; AutoTokenizer.from_pretrained('tscholak/cxmefzzi'); AutoModelForSeq2SeqLM.from_pretrained('tscholak/cxmefzzi')"

# Expose port
EXPOSE 7860

# Start Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]