Spaces:
Build error
Build error
# 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 | |
RUN curl -L https://ollama.com/download/linux-x64 -o ollama.zip \ | |
&& unzip ollama.zip -d /usr/local/bin \ | |
&& rm ollama.zip | |
# Set working directory for the app | |
WORKDIR /app | |
# Copy application files and model | |
COPY . /app | |
# Ensure the model file is copied into the container | |
COPY . /app/ | |
# Install Python dependencies | |
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 | |
CMD ["/app/start_services.sh"] | |