Axon / Dockerfile
AIencoder's picture
Update Dockerfile
5807e15 verified
raw
history blame
623 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir gradio requests
# Download Ollama binary directly (no install script needed)
RUN curl -L https://ollama.com/download/ollama-linux-amd64 -o /usr/bin/ollama && \
chmod +x /usr/bin/ollama
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
WORKDIR $HOME/app
ENV OLLAMA_HOST=0.0.0.0
ENV OLLAMA_MODELS=$HOME/.ollama/models
COPY --chown=user:user app.py .
COPY --chown=user:user entrypoint.sh .
RUN chmod +x entrypoint.sh
EXPOSE 7860
CMD ["bash", "entrypoint.sh"]