Skip to content

Commit

Permalink
updated the tag names for arm chip
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvais2 committed Sep 6, 2024
1 parent d3eacc3 commit 6288b2d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<platform> # can be cpu, gpu, or linux/arm64
docker pull atomsci/atomsci-ampl:latest-<platform> # can be cpu, gpu, or arm (for arm64 chip)
docker run -it -p 8888:8888 -v </local_workspace_folder>:</directory_in_docker> atomsci/atomsci-ampl:latest-<platform> bash
#inside docker environment
jupyter-notebook --ip=0.0.0.0 --allow-root --port=8888 &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 6288b2d

Please sign in to comment.