-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Janusz Marcinkiewicz <[email protected]>
- Loading branch information
Showing
3 changed files
with
29 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
DOCKER ?= docker | ||
REGISTRY_URL ?= docker.io | ||
CI_IMAGE=aistorage/ci | ||
IMAGE_TAG=latest | ||
CI_IMAGE ?= aistorage/ci | ||
IMAGE_TAG ?= latest | ||
|
||
all: build push | ||
|
||
build: | ||
docker build --network host --no-cache -t $(REGISTRY_URL)/$(CI_IMAGE):$(IMAGE_TAG) -f general.dockerfile . | ||
$(DOCKER) build --network host --no-cache -t $(REGISTRY_URL)/$(CI_IMAGE):$(IMAGE_TAG) -f general.dockerfile . | ||
push: | ||
docker push $(REGISTRY_URL)/$(CI_IMAGE):$(IMAGE_TAG) | ||
$(DOCKER) push $(REGISTRY_URL)/$(CI_IMAGE):$(IMAGE_TAG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
FROM golang:1.22 | ||
|
||
ENV GOPATH="/go" | ||
ENV PATH="${GOPATH}/bin:${PATH}" | ||
|
||
RUN apt-get update -yq | ||
RUN apt-get --no-install-recommends -y install curl git sysstat attr build-essential lsof coreutils python3-pip python3-setuptools s3cmd docker.io uuid-runtime bc gettext-base | ||
# Python source-build requirements | ||
RUN apt-get --no-install-recommends -y install wget libbz2-dev libncursesw5-dev unzip libreadline-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libffi-dev zlib1g-dev xz-utils lzma liblzma-dev | ||
|
||
# Install Python 3.11 from source | ||
RUN curl -o python3.11.tgz https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz | ||
RUN tar xf python3.11.tgz | ||
RUN (cd Python-3.11.1 && ./configure --enable-optimizations && make -j4 && make install) | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install awscli black[jupyter] | ||
RUN apt update -yq | ||
RUN apt-get --no-install-recommends -y install curl git sysstat attr build-essential lsof coreutils python3 python3-pip python3-setuptools s3cmd docker.io uuid-runtime bc gettext-base | ||
RUN python3 --version | ||
RUN python3 -m pip config set global.break-system-packages true | ||
RUN pip3 install --upgrade pip && pip3 install awscli black[jupyter] | ||
|
||
# Install `kubectl`. | ||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | ||
RUN chmod +x ./kubectl | ||
RUN mv ./kubectl /usr/local/bin/kubectl | ||
RUN kubectl version --client | ||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ | ||
chmod +x ./kubectl && \ | ||
mv ./kubectl /usr/local/bin/kubectl && \ | ||
kubectl version --client | ||
|
||
# Cache all dependencies and install the linter. | ||
# Install `kind`. | ||
RUN go install sigs.k8s.io/[email protected] | ||
|
||
# Cache all dependencies from `aistore` and install the linter. | ||
RUN git clone --depth=1 https://github.com/NVIDIA/aistore.git && cd aistore && \ | ||
go mod download && \ | ||
cd cmd/cli && go mod download && cd ../.. && \ | ||
make lint-update-ci && \ | ||
make install-python-deps && \ | ||
cd .. && rm -rf aistore | ||
go mod download && \ | ||
cd cmd/cli && go mod download && cd ../.. && \ | ||
make lint-update-ci && \ | ||
make install-python-deps && \ | ||
cd .. && rm -rf aistore | ||
|
||
# Cache all dependencies from `ais-k8s/operator`. | ||
RUN git clone --depth=1 https://github.com/NVIDIA/ais-k8s.git && cd ais-k8s/operator && \ | ||
go mod download && \ | ||
make kustomize controller-gen envtest golangci-lint && \ | ||
cd ../.. && rm -rf ais-k8s |