3v324v23's picture
Fix Ollama build error and use llama3 model
7b9c753
raw
history blame contribute delete
554 Bytes
FROM python:3.11-slim
# Install necessary tools
RUN apt-get update && apt-get install -y curl zstd && rm -rf /var/lib/apt/lists/*
# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Make entrypoint script executable
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
# Hugging Face Spaces expose port 7860 by default
EXPOSE 7860
# Run entrypoint script
CMD ["./entrypoint.sh"]