Spaces:
Build error
Build error
File size: 802 Bytes
0a66e69 |
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 |
# 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"]
|