File size: 735 Bytes
1f1d598 53fa03c 1f1d598 |
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 |
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Download and link the Spacy model inside the container
RUN python -m spacy download en_core_web_sm
# Copy the rest of the application code into the container
COPY . .
# Expose the port Streamlit runs on
EXPOSE 8501
# Command to run the application
CMD ["streamlit", "run", "app.py"]
|