File size: 609 Bytes
aa911b2 cd55154 aa911b2 3c7203e aa911b2 3c7203e aa911b2 3c7203e cd55154 3c7203e cd55154 aa911b2 cd55154 aa911b2 3c7203e aa911b2 b86ff81 388f960 45d4a05 103935d |
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 |
FROM ollama/ollama
# Install Python and dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
COPY ./app.py /app/app.py
COPY ./templates /app/templates
RUN pip3 install --no-cache-dir -r requirements.txt
EXPOSE 7860 11434
# Run Ollama and FastAPI app
# Run Ollama and FastAPI app
# Run Ollama and FastAPI app
CMD ["ollama", "serve", "&", "sleep", "5", "&&", "ollama", "pull", "gemma:2b", "&&", "python3", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |