File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ RUN --mount=type=cache,target=/root/.ccache \
8181FROM base AS build
8282WORKDIR /go/src/github.com/ollama/ollama
8383COPY go.mod go.sum .
84- RUN curl -fsSL https://golang.org/dl /go$(awk '/^go/ { print $2 }' go.mod).linux-$(case $(uname -m) in x86_64) echo amd64 ;; aarch64) echo arm64 ;; esac).tar.gz | tar xz -C /usr/local
84+ RUN curl -fsSL https://mirrors.aliyun.com/golang /go$(awk '/^go/ { print $2 }' go.mod).linux-$(case $(uname -m) in x86_64) echo amd64 ;; aarch64) echo arm64 ;; esac).tar.gz | tar xz -C /usr/local
8585ENV PATH=/usr/local/go/bin:$PATH
86+ ENV GOPROXY=https://goproxy.cn,direct
8687RUN go mod download
8788COPY . .
8889ARG GOFLAGS="'-ldflags=-w -s'"
Original file line number Diff line number Diff line change 1515 LOAD_OR_PUSH=" --push"
1616fi
1717
18- docker buildx build \
19- ${LOAD_OR_PUSH} \
20- --platform=${PLATFORM} \
21- ${OLLAMA_COMMON_BUILD_ARGS} \
22- -f Dockerfile \
23- -t ${FINAL_IMAGE_REPO} :$VERSION \
24- .
18+ FLAVORS=" musa"
19+ if [ " ${DOCKER_ORG} " != " mthreads" ]; then
20+ docker buildx build \
21+ ${LOAD_OR_PUSH} \
22+ --platform=${PLATFORM} \
23+ ${OLLAMA_COMMON_BUILD_ARGS} \
24+ -f Dockerfile \
25+ -t ${FINAL_IMAGE_REPO} :$VERSION \
26+ .
27+ FLAVORS=" rocm musa"
28+ fi
29+
2530
2631if echo $PLATFORM | grep " amd64" > /dev/null; then
27- for FLAVOR in " rocm " " musa " ; do
32+ for FLAVOR in $FLAVORS ; do
2833 docker buildx build \
2934 ${LOAD_OR_PUSH} \
3035 --platform=linux/amd64 \
You can’t perform that action at this time.
0 commit comments