Zaki / Dockerfile
alibidaran's picture
Update Dockerfile
1e0ba8c verified
raw
history blame
804 Bytes
# Base image for Python
FROM python:3.10-slim
# Install dependencies for Ollama
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/*
# Install Ollama server
# Set working directory for the app
WORKDIR /app
# RUN mkdir -p /app/.ollama
# # Set environment variable for Ollama home directory
# ENV OLLAMA_HOME=/app/.ollama
# Copy application files and model
COPY . /app
# Install Python dependencies
RUN curl -fsSL https://ollama.com/install.sh | sh
RUN pip install --no-cache-dir gradio requests
# Expose ports for Gradio and Ollama
EXPOSE 7860 11434
# Start both services using a script
COPY start_services.sh /app/start_services.sh
RUN chmod +x /app/start_services.sh
# Download the Ollama service
# Run the start_services.sh script
CMD ["/app/start_services.sh"]