File size: 784 Bytes
fed509a 2933a4c e94079d ae7f56e fed509a c17553c ae7f56e 77dec55 c17553c e94079d c17553c e94079d ae7f56e e94079d ae7f56e 2933a4c 7e211e6 e94079d c17553c ae7f56e c17553c |
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 32 33 34 35 |
From public.ecr.aws/docker/library/python:3.9.19-bullseye
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y wget git lsof net-tools curl iproute2 netcat
RUN curl -fsSL https://ollama.com/install.sh | sh
# Create a new user 'user' with UID 1000 and set the home directory
RUN useradd -m -u 1000 user
# Set the working directory to /app
WORKDIR /app
# Copy the requirements.txt file and change its ownership to 'user'
COPY --chown=user ./run_ollama.sh run_ollama.sh
COPY --chown=user . /app
# Switch to the 'user' user
USER user
# Set the HOME and PATH environment variables for the user
ENV HOME=/home/user
ENV PATH=$HOME/.local/bin:$PATH
ENV OLLAMA_HOST=0.0.0.0
ENV OLLAMA_ORIGINS="*"
EXPOSE 11434
WORKDIR /app
CMD ["/bin/bash", "/app/run_ollama.sh"] |