File size: 826 Bytes
b6f9e09 6dd82a0 b6f9e09 |
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 |
# Use an official Python runtime as a base 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 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Ollama (you may need to adjust the installation method depending on the source)
RUN curl -o ollama-installer.sh https://ollama.com/download.sh && \
chmod +x ollama-installer.sh && \
./ollama-installer.sh
# Install Python dependencies (Streamlit and langchain_ollama)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code to the container
COPY . .
# Expose port 8501 for Streamlit
EXPOSE 8080
# Command to run the app
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|