Spaces:
Runtime error
Runtime error
File size: 804 Bytes
2909c70 1e0ba8c 2909c70 1e0ba8c 2909c70 1e0ba8c 2909c70 1e0ba8c 2909c70 9baedd4 2909c70 |
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 31 32 33 34 |
# 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"] |