File size: 535 Bytes
58d375a 19404d2 b4e4d28 a4fb895 b691038 610f688 a61f414 9e3f9c1 58d375a 19404d2 58d375a |
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 |
FROM ollama/ollama:latest
# Create a user and set up permissions
RUN useradd -ms /bin/bash ollama-user
# Set the home directory
ENV HOME=/home/ollama-user
WORKDIR $HOME
# Ensure the user has access to the directory
RUN mkdir -p $HOME/.ollama && chown -R ollama-user:ollama-user $HOME/.ollama
# Switch to the new user
USER ollama-user
ENV OLLAMA_HOST=0.0.0.0:7860
ENTRYPOINT ollama
CMD ["serve"]
# Expose port 8050
# EXPOSE $SPACE_HOST
# # Start the Ollama server
# CMD ["/usr/local/bin/ollama", "serve", "--port", $SPACE_HOST] |