forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (35 loc) · 1.25 KB
/
Dockerfile
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
36
37
38
39
40
41
42
43
44
45
#---
# name: ollama
# group: llm
# config: config.py
# depends: cuda
# requires: '>=34.1.0'
# docs: docs.md
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG OLLAMA_REPO \
OLLAMA_BRANCH \
GOLANG_VERSION \
CMAKE_VERSION \
JETPACK_VERSION \
CUDA_VERSION_MAJOR \
CMAKE_CUDA_ARCHITECTURES
ENV OLLAMA_HOST=0.0.0.0 \
OLLAMA_MODELS=/data/models/ollama/models \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64:/usr/local/cuda/include:${LD_LIBRARY_PATH} \
JETSON_JETPACK=${JETPACK_VERSION} \
CUDA_VERSION_MAJOR=${CUDA_VERSION_MAJOR}
COPY nv_tegra_release /etc/nv_tegra_release
EXPOSE 11434
# @dusty-nv: this curl does not work to automatically rebuild on upstream changes,
# because the curl command gets cached in docker. Reverting to the ADD method.
#RUN curl -H "Authorization: token ${GITHUB_TOKEN}" \
# -o /tmp/ollama_version.json \
# https://api.github.com/repos/ollama/ollama/branches/${OLLAMA_BRANCH}
ADD https://api.github.com/repos/ollama/ollama/branches/${OLLAMA_BRANCH} /tmp/ollama_version.json
RUN curl -fsSL https://ollama.com/install.sh | sh
RUN ln -s /usr/bin/python3 /usr/bin/python
COPY start_ollama /
CMD /start_ollama && /bin/bash