File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 11FROM ubuntu:latest
2+
23ENV NJOBS=8
34ENV CONDA_HOME=/root/anaconda3
45ENV PATH=${CONDA_HOME}/bin:${PATH}
56
7+ ARG TARGETPLATFORM
8+ ARG BUILDPLATFORM
9+
610# ubuntu
711RUN apt-get update -y \
812 && apt-get upgrade -y \
@@ -26,7 +30,9 @@ RUN apt-get update -y \
2630 wget
2731
2832# anaconda
29- RUN wget -q https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh -O /tmp/anaconda.sh \
33+ COPY scripts/download-conda.sh /tmp/download-conda.sh
34+ RUN chmod +x /tmp/download-conda.sh \
35+ && /bin/bash /tmp/download-conda.sh \
3036 && /bin/bash /tmp/anaconda.sh -b -p $CONDA_HOME \
3137 && conda update conda -y \
3238 && conda update --all -y \
Original file line number Diff line number Diff line change @@ -8,9 +8,7 @@ IMAGE_VERSION = $(ORGANIZATION)/$(REPOSITORY):$(VERSION)
88IMAGE_LATEST = $(ORGANIZATION ) /$(REPOSITORY ) :latest
99
1010build :
11- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $(IMAGE_VERSION ) .
12- docker tag $(IMAGE_VERSION ) ${IMAGE_LATEST}
11+ docker buildx build --platform linux/amd64,linux/arm64 -t $(IMAGE_VERSION ) --push .
1312
1413push :
15- docker push ${IMAGE_VERSION}
16- docker push ${IMAGE_LATEST}
14+ docker push ${IMAGE_VERSION}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [ $TARGETPLATFORM == " linux/arm64" ]
3+ then
4+ echo " downloading anaconda for linux/arm64"
5+ wget -q https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-aarch64.sh -O /tmp/anaconda.sh
6+ else
7+ echo " downloading anaconda for linux/amd64"
8+ wget -q https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh -O /tmp/anaconda.sh
9+ fi
You can’t perform that action at this time.
0 commit comments