ollama-server3 / Dockerfile
Mmfallah's picture
Update Dockerfile
a6cb76b verified
Raw
History Blame Contribute Delete
558 Bytes
FROM python:3.9-slim
# Install curl, zstd, and Ollama
RUN apt-get update && apt-get install -y curl zstd && \
curl -fsSL https://ollama.com/install.sh | sh && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Setup user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH="/home/user/.local/bin:$PATH"
WORKDIR $HOME/app
# Install Python deps
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app
COPY --chown=user . .
# Make start script executable
RUN chmod +x start.sh
CMD ["./start.sh"]