Spaces:
Sleeping
Sleeping
File size: 726 Bytes
b24dc4d ad56392 b24dc4d ad56392 b24dc4d ad56392 b24dc4d 409a089 ad56392 b24dc4d ad56392 b24dc4d ad56392 b24dc4d ad56392 b24dc4d ad56392 b24dc4d ad56392 b24dc4d |
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 27 28 29 30 31 |
# Use the latest version of the ollama image
FROM ollama/ollama:latest
# Install curl and create a user
RUN apt-get update && \
apt-get install -y curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
useradd -m -u 1000 user
# Set environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
OLLAMA_HOST=0.0.0.0 \
OLLAMA_ORIGINS=*
# Set the working directory and switch to the user
WORKDIR $HOME/app
USER user
COPY --chown=user:user entrypoint.sh $HOME/app/
# Make the entrypoint script executable
RUN chmod +x $HOME/app/entrypoint.sh
# Expose the port for the Ollama server
EXPOSE 11434
# Set the entrypoint to the entrypoint script
ENTRYPOINT ["./entrypoint.sh"]
|