-
Notifications
You must be signed in to change notification settings - Fork 842
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (34 loc) · 1.01 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (34 loc) · 1.01 KB
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
#---
# name: ollama
# group: llm
# config: config.py
# depends: [cuda, cudastack:standard, cmake, python, numpy, huggingface_hub, sudonim, go]
# buildkit_device: nvidia.com/gpu=all
# requires: '>=34.1.0'
# docs: docs.md
# test: test.sh
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG OLLAMA_VERSION \
JETPACK_VERSION_MAJOR \
IS_SBSA \
CUDA_VERSION_MAJOR
ENV OLLAMA_VERSION=${OLLAMA_VERSION} \
OLLAMA_HOST=0.0.0.0 \
OLLAMA_LOGS=/data/logs/ollama.log \
OLLAMA_MODELS=/data/models/ollama/models \
OLLAMA_HOME=/opt/ollama \
IS_SBSA=${IS_SBSA} \
CUDA_VERSION_MAJOR=${CUDA_VERSION_MAJOR}
# Copy nv_tegra_release, build, install, and start_ollama to their respective locations
COPY nv_tegra_release /etc/nv_tegra_release
COPY docker_files/ /
RUN chmod +x /tmp/OLLAMA/build.sh /tmp/OLLAMA/install.sh /start_ollama \
&& if [ "${IS_SBSA}" = "True" ]; then \
/tmp/OLLAMA/build.sh; \
else \
/tmp/OLLAMA/install.sh || /tmp/OLLAMA/build.sh; \
fi
CMD /start_ollama && /bin/bash
EXPOSE 11434