Spaces:
Sleeping
Sleeping
File size: 659 Bytes
58d375a 19404d2 01925f1 e0d433f eba1da3 01925f1 055caa1 687e3e9 41ceb4b 4b02465 a4fb895 b691038 3941f98 4b02465 3941f98 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM ollama/ollama:latest
# Use /tmp for Ollama data (writable by all users)
ENV OLLAMA_HOME=/tmp/ollama
RUN mkdir -p /tmp/ollama && chmod 777 /tmp/ollama
# Install netcat-openbsd (more reliable than netcat)
RUN apt-get update && apt-get install -y netcat-openbsd && rm -rf /var/lib/apt/lists/*
# Copy the entrypoint script
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# Set permissions for the entrypoint script
RUN chmod +x /usr/local/bin/entrypoint.sh
# Set Ollama to listen on all network interfaces
ENV OLLAMA_HOST=0.0.0.0:7860
# Expose the default port
EXPOSE 7860
# Use the custom entrypoint script
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |