# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
# you will also find guides on how best to write your Dockerfile | |
FROM ollama/ollama:latest | |
RUN apt-get update && apt-get upgrade -y && \ | |
apt-get install -y wget git lsof net-tools python3-pip curl iproute2 netcat | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV PATH="/home/user/.local/bin:$PATH" | |
ENV OLLAMA_HOST=0.0.0.0 | |
ENV OLLAMA_ORIGINS="*" | |
WORKDIR /app | |
RUN ollama serve | |
RUN ollama pull mistral | |
CMD ["ollama", "serve"] | |
# COPY --chown=user ./requirements.txt requirements.txt | |
# RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
# COPY --chown=user . /app | |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |