Spaces:
Sleeping
Sleeping
File size: 493 Bytes
207913a |
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 |
FROM python:3.9-slim
ENV PYTHONUNBUFFERED=1 \
OLLAMA_HOST=0.0.0.0:11434
RUN apt-get update && apt-get install -y \
curl \
procps \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://ollama.com/install.sh | sh
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir -p /.ollama && chmod 777 /.ollama
ENV OLLAMA_MODELS=/.ollama/models
COPY . .
EXPOSE 7860
CMD ollama serve & \
uvicorn main:app --host 0.0.0.0 --port 7860
|