chat_bot / Dockerfile
Guhanselvam's picture
Update Dockerfile
0f8cc03 verified
Raw
History Blame Contribute Delete
851 Bytes
# Use a suitable base image. This one has Python and some common tools.
FROM python:3.10-slim-bullseye
# Set the working directory inside the container
WORKDIR /app
# Copy requirements file first to leverage Docker's caching
COPY requirements.txt .
# Install system dependencies for Ollama (if needed - check Ollama's instructions)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
# Add any other system dependencies Ollama requires here
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application code
COPY . .
# Expose the ports (for Flask and Gradio)
EXPOSE 5000
EXPOSE 7860
# Command to run when the container starts. Start Flask first, then Gradio.
CMD ["bash", "-c", "python api.py & python app.py"]