|
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 |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY --chown=user ./run_ollama.sh run_ollama.sh |
|
|
|
COPY --chown=user . /app |
|
|
|
|
|
USER 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"] |