Skip to content

Commit

Permalink
add new pypi source, goproxy, npm registry, and update docker image p…
Browse files Browse the repository at this point in the history
…ull policy

Signed-off-by: ZHANGWENTAI <[email protected]>
  • Loading branch information
ZHANGWENTAI committed Oct 31, 2024
1 parent 9fb1a10 commit ca04435
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 18 deletions.
4 changes: 2 additions & 2 deletions cmd/algorithm/grid/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN if [ "$(uname -m)" = "ppc64le" ] || [ "$(uname -m)" = "aarch64" ]; then \
apt-get -y install gfortran libopenblas-dev liblapack-dev && \
pip install cython 'numpy>=1.13.3'; \
fi
RUN GRPC_HEALTH_PROBE_VERSION=v0.3.1 && \
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.28 && \
if [ "$(uname -m)" = "ppc64le" ]; then \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-ppc64le; \
elif [ "$(uname -m)" = "aarch64" ]; then \
Expand All @@ -23,7 +23,7 @@ ADD ./pkg/ ${TARGET_DIR}/pkg/
ADD ./api/ ${TARGET_DIR}/api/
ADD ./${SUGGESTION_DIR}/ ${TARGET_DIR}/${SUGGESTION_DIR}/
WORKDIR ${TARGET_DIR}/${SUGGESTION_DIR}
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

RUN chgrp -R 0 ${TARGET_DIR} \
&& chmod -R g+rwX ${TARGET_DIR}
Expand Down
3 changes: 2 additions & 1 deletion console/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM golang:1.16.5 as backend-builder
WORKDIR /workspace

COPY . .
ENV GOPROXY=https://goproxy.cn,direct
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go mod vendor
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -a -o backend-server console/backend/main.go

Expand All @@ -12,7 +13,7 @@ WORKDIR /workspace

COPY console/frontend/ .
RUN rm -rf ./dist && rm -rf ./node_modules && rm -f ./package-lock.json
RUN npm --registry=https://registry.npm.taobao.org install --no-optional
RUN npm --registry=https://registry.npmmirror.com install --no-optional
RUN npm run build

FROM alpine:latest
Expand Down
70 changes: 65 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/alibaba/morphling

go 1.16
go 1.22

require (
github.com/ghodss/yaml v1.0.0
Expand All @@ -12,13 +12,9 @@ require (
github.com/golang/mock v1.4.4
github.com/golang/protobuf v1.4.3
github.com/jinzhu/gorm v1.9.16
github.com/jinzhu/now v1.1.2 // indirect
github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect
github.com/onsi/gomega v1.8.1
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 // indirect
google.golang.org/genproto v0.0.0-20201015140912-32ed001d685c // indirect
google.golang.org/grpc v1.32.0
google.golang.org/protobuf v1.25.0
k8s.io/api v0.18.5
Expand All @@ -29,6 +25,70 @@ require (
sigs.k8s.io/controller-runtime v0.6.0
)

require (
cloud.google.com/go v0.38.0 // indirect
github.com/beorn7/perks v1.0.0 // indirect
github.com/blang/semver v3.5.0+incompatible // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.5.0+incompatible // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/zapr v0.1.0 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/google/go-cmp v0.5.0 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/sessions v1.1.3 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.2 // indirect
github.com/json-iterator/go v1.1.9 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.4.1 // indirect
github.com/prometheus/procfs v0.0.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
gomodules.xyz/jsonpatch/v2 v2.0.1 // indirect
google.golang.org/appengine v1.5.0 // indirect
google.golang.org/genproto v0.0.0-20201015140912-32ed001d685c // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
k8s.io/apiextensions-apiserver v0.18.2 // indirect
k8s.io/apiserver v0.18.5 // indirect
k8s.io/component-base v0.18.5 // indirect
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 // indirect
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 // indirect
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

replace (
k8s.io/api => k8s.io/api v0.18.5
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.18.5
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLY
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
Expand Down
2 changes: 1 addition & 1 deletion manifests/algorithm/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
spec:
containers:
- image: kubedl/morphling-algorithm:base
imagePullPolicy: Always #IfNotPresent
imagePullPolicy: IfNotPresent
# command: [ "/bin/sh" ]
# args: ["-c", "sleep 100000"]

Expand Down
2 changes: 1 addition & 1 deletion manifests/controllers/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
containers:
- name: morphling-controller
image: kubedl/morphling-controllers
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command: ["./morphling-controller"]
ports:
- containerPort: 8443
Expand Down
2 changes: 1 addition & 1 deletion manifests/db-manager/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
containers:
- name: morphling-db-manager
image: kubedl/morphling-database-manager
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
- name : DB_NAME
value: "mysql"
Expand Down
4 changes: 2 additions & 2 deletions manifests/mysql-db/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ spec:
spec:
containers:
- name: morphling-mysql
image: kubedl/mysql:8.0.26
imagePullPolicy: Always
image: mysql:latest
imagePullPolicy: IfNotPresent
args:
- --datadir
- /var/lib/mysql/datadir
Expand Down
2 changes: 1 addition & 1 deletion manifests/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
containers:
- name: morphling-ui
image: kubedl/morphling-ui
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- '/backend-server'
args:
Expand Down
6 changes: 3 additions & 3 deletions pkg/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN if [ "$(uname -m)" = "ppc64le" ] || [ "$(uname -m)" = "aarch64" ]; then \
apt-get -y install gfortran libopenblas-dev liblapack-dev && \
pip install cython 'numpy>=1.13.3'; \
fi
RUN GRPC_HEALTH_PROBE_VERSION=v0.3.1 && \
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.28 && \
if [ "$(uname -m)" = "ppc64le" ]; then \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-ppc64le; \
elif [ "$(uname -m)" = "aarch64" ]; then \
Expand All @@ -17,8 +17,8 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.3.1 && \

ADD . /workspace
WORKDIR /workspace
#RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt

ENV BATCH_SIZE 1
ENTRYPOINT ["/bin/sh", "-c", "sleep 100000"]

0 comments on commit ca04435

Please sign in to comment.