Spaces:
Runtime error
Runtime error
# Base image with Python support | |
FROM python:3.9 | |
# Install dependencies for Ollama installation script (optional) | |
RUN apt-get update && apt-get install -y curl wget | |
# Download and potentially execute Ollama installation script (commented out) | |
# **Alternative: Install Ollama using a package manager (if available)** | |
RUN pip install ollama | |
RUN pip install flask | |
# Set working directory | |
WORKDIR / | |
# Copy your FastAPI application code (assuming 'main.py') | |
COPY main.py . | |
COPY entrypoint.sh . | |
# # Start Ollama server in the background | |
# RUN nohup ollama & | |
RUN curl -fsSL https://ollama.com/install.sh | sh | |
RUN chmod +x ./entrypoint.sh | |
ENTRYPOINT ["./entrypoint.sh"] |