Navya-Sree's picture
Update Dockerfile
9ebe016 verified
raw
history blame contribute delete
732 Bytes
# 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"]