Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
a47d8b25
Unverified
Commit
a47d8b25
authored
Jan 26, 2024
by
Daniel Hiltgen
Committed by
GitHub
Jan 26, 2024
Browse files
Merge pull request #2197 from dhiltgen/remove_rocm_image
Add back ROCm container support
parents
30c43c28
75c44aa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
Dockerfile
Dockerfile
+11
-1
scripts/build_docker.sh
scripts/build_docker.sh
+10
-0
No files found.
Dockerfile
View file @
a47d8b25
...
...
@@ -116,11 +116,21 @@ FROM --platform=linux/arm64 ubuntu:22.04 as runtime-arm64
RUN
apt-get update
&&
apt-get
install
-y
ca-certificates
COPY
--from=build-arm64 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
# Radeon images are much larger so we keep it distinct from the CPU/CUDA image
FROM
--platform=linux/amd64 rocm/dev-centos-7:5.7.1-complete as runtime-rocm
RUN
update-pciids
COPY
--from=build-amd64 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
EXPOSE
11434
ENV
OLLAMA_HOST 0.0.0.0
ENTRYPOINT
["/bin/ollama"]
CMD
["serve"]
FROM
runtime-$TARGETARCH
EXPOSE
11434
ENV
OLLAMA_HOST 0.0.0.0
ENV
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV
LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
:/opt/rocm/lib:
ENV
LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV
NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENTRYPOINT
["/bin/ollama"]
...
...
scripts/build_docker.sh
View file @
a47d8b25
...
...
@@ -13,3 +13,13 @@ docker build \
-f
Dockerfile
\
-t
ollama/ollama:
$VERSION
\
.
docker build
\
--load
\
--platform
=
linux/amd64
\
--build-arg
=
VERSION
\
--build-arg
=
GOFLAGS
\
--target
runtime-rocm
\
-f
Dockerfile
\
-t
ollama/ollama:
$VERSION
-rocm
\
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment