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
6f58c776
Commit
6f58c776
authored
Oct 12, 2023
by
Jeffrey Morgan
Browse files
update `Dockerfile.build` for linux binary builds
parent
7a537cdc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
Dockerfile.build
Dockerfile.build
+14
-9
No files found.
Dockerfile.build
View file @
6f58c776
# amd64 dependencies
# centos7 amd64 dependencies
FROM --platform=linux/amd64 nvidia/cuda:11.3.1-devel-centos7 AS base-amd64
FROM --platform=linux/amd64 nvidia/cuda:11.8.0-devel-centos7 AS base-amd64
RUN yum install -y https://repo.ius.io/ius-release-el7.rpm centos-release-scl && \
RUN yum install -y https://repo.ius.io/ius-release-el7.rpm centos-release-scl && \
yum update -y && \
yum update -y && \
yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ git236 wget
yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ git236 wget
RUN wget "https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh" -O cmake-installer.sh && chmod +x cmake-installer.sh && ./cmake-installer.sh --skip-license --prefix=/usr/local
RUN wget "https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh" -O cmake-installer.sh && chmod +x cmake-installer.sh && ./cmake-installer.sh --skip-license --prefix=/usr/local
ENV PATH /opt/rh/devtoolset-10/root/usr/bin:$PATH
ENV PATH /opt/rh/devtoolset-10/root/usr/bin:$PATH
# centos8 arm64 dependencies
# arm64 dependencies
FROM --platform=linux/arm64 nvidia/cuda:11.4.3-devel-centos8 AS base-arm64
FROM --platform=linux/arm64 nvidia/cuda:11.3.1-devel-ubuntu18.04 AS base-arm64
RUN sed -i -e 's/mirrorlist/#mirrorlist/g' -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN apt-get update && \
RUN yum install -y git cmake
apt-get install -y git build-essential wget software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y gcc-9 g++-9 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 && \
update-alternatives --config gcc
RUN wget "https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-aarch64.sh" -O cmake-installer.sh && chmod +x cmake-installer.sh && ./cmake-installer.sh --skip-license --prefix=/usr/local
FROM base-${TARGETARCH}
FROM base-${TARGETARCH}
ARG TARGETARCH
ARG TARGETARCH
ARG GOFLAGS="'-ldflags -w -s'"
ARG GOFLAGS="'-ldflags -w -s'"
# install go
# install go
ADD https://dl.google.com/go/go1.21.
1
.linux-$TARGETARCH.tar.gz /tmp/go1.21.
1
.tar.gz
ADD https://dl.google.com/go/go1.21.
3
.linux-$TARGETARCH.tar.gz /tmp/go1.21.
3
.tar.gz
RUN mkdir -p /usr/local && tar xz -C /usr/local </tmp/go1.21.
1
.tar.gz
RUN mkdir -p /usr/local && tar xz -C /usr/local </tmp/go1.21.
3
.tar.gz
# build the final binary
# build the final binary
WORKDIR /go/src/github.com/jmorganca/ollama
WORKDIR /go/src/github.com/jmorganca/ollama
...
...
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