diff --git a/Makefile b/Makefile index cfce22bd..9aeebd4d 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,19 @@ ifeq ($(ARCH), gpu) GPU_ARG = --gpus all endif +# define subtag. used for push +ifneq ($(ARCH),) + SUBTAG = arm +else + SUBTAG = $(PLATFORM) +endif + # Release version VERSION=$(shell cat VERSION) # If ENV is from master branch, we use VERSION for the tag, otherwise use PLATFORM ifeq ($(ENV), master) - TAG = v$(VERSION)-$(PLATFORM) # version used for AMPL official release, v1.6.3 for example + TAG = v$(VERSION)-$(SUBTAG) else TAG = $(PLATFORM)-$(ENV) endif @@ -52,7 +59,7 @@ pull-docker: # Push Docker image push-docker: - docker buildx build --no-cache -t $(IMAGE_REPO):$(TAG) -t $(IMAGE_REPO):latest-$(PLATFORM) --build-arg ENV=$(ENV) $(PLATFORM_ARG) --push -f Dockerfile.$(PLATFORM) . + docker buildx build --no-cache -t $(IMAGE_REPO):$(TAG) -t $(IMAGE_REPO):latest-$(SUBTAG) --build-arg ENV=$(ENV) $(PLATFORM_ARG) --push -f Dockerfile.$(PLATFORM) . # Save Docker image save-docker: diff --git a/README.md b/README.md index 21ac6851..9d4562bb 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ To retrieve, run version 1.6.2 or earlier, please specify the desired version ta For AMPL versions 1.6.3 and later, we offer downloadable images for various platforms (CPU, GPU or Linux/ARM64). To run a Docker container, be sure to append `bash` at the end of the command to open a bash session. ``` - docker pull atomsci/atomsci-ampl:latest- # can be cpu, gpu, or linux/arm64 + docker pull atomsci/atomsci-ampl:latest- # can be cpu, gpu, or arm (for arm64 chip) docker run -it -p 8888:8888 -v : atomsci/atomsci-ampl:latest- bash #inside docker environment jupyter-notebook --ip=0.0.0.0 --allow-root --port=8888 & diff --git a/atomsci/ddm/docs/source/get_started/install_with_docker.rst b/atomsci/ddm/docs/source/get_started/install_with_docker.rst index e09528ae..60ff3ce5 100644 --- a/atomsci/ddm/docs/source/get_started/install_with_docker.rst +++ b/atomsci/ddm/docs/source/get_started/install_with_docker.rst @@ -43,7 +43,7 @@ For 1.6.3 and later, you can download the latest images for various platforms (C .. code-block:: - docker pull atomsci/atomsci-ampl:latest-cpu # Specify the latest image built for a platform (cpu, gpu, or linux/arm64) + docker pull atomsci/atomsci-ampl:latest-cpu # Specify the latest image built for a platform (use those for tags 'cpu', 'gpu', or 'arm') After that, please follow the instruction from the ":ref:`Start container`" step.